Hmm, Google Groups hickup again. My initial reply from 3:16 is listed
as *latest entry*, after the one made at 4:21pm. So if what I write
don't make sense, please blame Google. :)

/Casper

On Jun 24, 3:16 pm, Casper Bang <[email protected]> wrote:
> > I think type erasure was an error, I would have preferred no generics to
> > what we have.  I agree though that few languages that claim to have
> > properly supported parameterized types do.
>
> I'm with you on that. Erasure introduces an unnecessary duality in the
> type-system where you read one thing, but the compiler and runtime
> really sees something else! One can not write implements
> Comparable&lt;T&gt;,Comparable&lt;U&gt;" because underneath the layer
> of lipgloss it really reads "implements Comparable&lt;Object&gt,
> Comparable&lt;Object&gt" due to the fact that the compiler is really
> just injecting down-casts and type-checks plus some extra meta-data
> solely for reflection purposes.
>
> At least in C#, you get what you see, plus they can do a whole lot of
> performance optimization and code sharing. There's a decent comparison
> at 
> Wikipedia:http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java#Generics
>
> Sometimes it's ok to draw a line in the sand and break with
> comparability to fix something, Java could be much much more elegant
> and lean today.
>
> /Casper

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to