Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #11772
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Converting Sets |
| Date | 2012-02-03 22:30 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <10995518.1271.1328337039358.JavaMail.geo-discussion-forums@prhz38> (permalink) |
| References | (1 earlier) <4f2a767d$0$449$426a34cc@news.free.fr> <vq3li79bbkel9maksor8n63m6jr5pgsq5q@4ax.com> <4f2aa4fe$0$6897$426a74cc@news.free.fr> <jgegmb$gqc$1@dont-email.me> <p29mi7hc3v300i0au9brcs0hnbuf1dapgs@4ax.com> |
On Thursday, February 2, 2012 4:29:09 PM UTC-8, Roedy Green wrote: > On Thu, 02 Feb 2012 09:21:13 -0800, markspace <-@.> wrote, quoted or > indirectly quoted someone who said : > > >I think this is covered in Effective Java. Generics are a compile time > >thing > > Everything else in Java eventually seems obvious. Generics on the > other hand get weirder and weirder the more I learn. I think it was a > mistake to try to do generics purely at compile time. It is like > trying to do all types purely at compile time. Nonsense. It's perfectly fine at compile time as far as it goes. You want to catch bugs at compile time rather than run time. If you want generics at run time then add a type token. Doing all types at compile time is the whole point of a strongly-typed language like Java. (OK, not all, but as much as you can.) > Have we gone down that road too far now that Java can never be fixed If it were truly broken that'd be a good question. > with run-time generics info without starting over with some completely > different notation? Then serialisation could work, containers could be > allocated with the precise array type. You would not have so much > under-the-hood casting. This is an ancient and tired debate. Java does compile-time only with generics. Sadly, this forces the programmer to fully understand the type assertions they wish to make, and thus write better code. What a shame. > Perhaps it is time to read-read all the generics docs and see if they > make more sense now with some practical experience under my belt. Generics is tricky. No question. Its difficulty exactly matches that of complete type analysis. Type analysis is tricky. No question. Its difficulty matches that of programming. Programming is tricky. No question. -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Converting Sets Roedy Green <see_website@mindprod.com.invalid> - 2012-02-01 23:34 -0800
Re: Converting Sets Mayeul <mayeul.marguet@free.fr> - 2012-02-02 12:47 +0100
Re: Converting Sets Roedy Green <see_website@mindprod.com.invalid> - 2012-02-02 05:32 -0800
Re: Converting Sets Mayeul <mayeul.marguet@free.fr> - 2012-02-02 16:06 +0100
Re: Converting Sets markspace <-@.> - 2012-02-02 09:21 -0800
Re: Converting Sets Jim Janney <jjanney@shell.xmission.com> - 2012-02-02 13:13 -0700
Re: Converting Sets markspace <-@.> - 2012-02-02 13:46 -0800
Re: Converting Sets Roedy Green <see_website@mindprod.com.invalid> - 2012-02-02 16:29 -0800
Re: Converting Sets Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-02 17:34 -0800
Re: Converting Sets Arne Vajhøj <arne@vajhoej.dk> - 2012-02-04 20:49 -0500
Re: Converting Sets Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-06 12:55 -0800
Re: Converting Sets Arne Vajhøj <arne@vajhoej.dk> - 2012-02-06 20:47 -0500
Re: Converting Sets Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-06 17:51 -0800
Re: Converting Sets Arne Vajhøj <arne@vajhoej.dk> - 2012-02-06 20:57 -0500
Re: Converting Sets markspace <-@.> - 2012-02-03 14:12 -0800
Re: Converting Sets Lew <lewbloch@gmail.com> - 2012-02-03 22:32 -0800
Re: Converting Sets Lew <lewbloch@gmail.com> - 2012-02-03 22:30 -0800
Re: Converting Sets Lew <lewbloch@gmail.com> - 2012-02-03 22:33 -0800
Re: Converting Sets Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-02 11:02 -0800
Re: Converting Sets Roedy Green <see_website@mindprod.com.invalid> - 2012-02-02 18:25 -0800
Re: Converting Sets markspace <-@.> - 2012-02-03 14:25 -0800
csiph-web