what about throwing generic exceptions with type parameters? 2010/8/31 Cédric Beust ♔ <ced...@beust.com>
> Hi Russel, > > On Tue, Aug 31, 2010 at 7:51 AM, Russel Winder <rus...@russel.org.uk>wrote: > >> Perhaps the JVM could then support type parameters and the abomination >> that is type erasure could be dispensed with. >> > > I'm surprised by the intensity of your statement, it's quite unusual coming > from you :-) > > In a regular Java code base, I would say that the amount of reflection is > very low, probably 5% or less (already a generous number in my opinion, > since most of it is probably because of annotations). > > Out of these 5%, how much really needs access to erased type information? > That number is probably vanishingly small. > > And the thing is: if you really need this information, you can have it to > some extent with > > - getGenericType > - Or even better, the very clever > TypeLiteral<http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/TypeLiteral.html> > . > > Overall, I think erasure has worked very well in practice, so I'm curious > to hear why you think it's such a disaster? > > -- > Cédric > > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to javapo...@googlegroups.com. > To unsubscribe from this group, send email to > javaposse+unsubscr...@googlegroups.com<javaposse%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javapo...@googlegroups.com. To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.