[Proposal]

xs0 xs0 at xs0.com
Mon Jun 19 00:15:07 PDT 2006


> I suppose the one advantage that .NET has over Java *and* C++/D is that
> its templates are compiled without being expanded first.  This means
> that arbitrary libraries can come along and instantiate the templates,
> even without the source code.  AFAIK, Java does what C++ and D do, which
> is to expand all the templates on compilation.

Actually, Java doesn't do any expansion at all - all the generic type 
information is in fact lost upon compilation (so-called "type erasure") 
and the only purpose generics have is improved type safety in source - 
you can now finally read/write what a container is supposed to contain..


xs0





More information about the Digitalmars-d mailing list