Good read. You got me wondering why type erasure is used. From the Java
site:

Type erasure enables Java applications that use generics to maintain binary
compatibility with Java libraries and applications that were created before
generics.

That might be why it feels more "natural" to me than the .NET stuff, just
because I have a long history with Java. You're probably right on the .NET
system being better in the long run, it was designed at a time when they
could take all the lessons and mistakes of Java into account...

On Fri, Jan 9, 2009 at 8:05 PM, Jonathan Pryor <[email protected]> wrote:

> On Fri, 2009-01-09 at 16:42 -0800, neptune235 wrote:
> > Oh, that's totally different than Java, but it seems to work fine. Thanks
> for
> > your help!
>
> That's because Java implements generics through type erasure, so all
> generic instantiations use the same (non-generic) type.  .NET generics
> are real.
>
> This confers a number of advantages (and a few disadvantages with
> respect to generic co- and contra-variance, which C# 4 fixes); see the
> Completely Unbiased* article:
>
>        http://www.jprl.com/Blog/archive/development/2007/Aug-31.html
>
>  - Jon
>
> * read: biased, based on my experiences trying to understand Java
> generics, then wondering wtf they were thinking...
>
>
>
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to