What is the best way to deal with this?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Feb 24 08:20:20 PST 2013


On 2/24/13 1:50 PM, Timon Gehr wrote:
> On 02/24/2013 04:59 AM, Steven Schveighoffer wrote:
>> ...
>>
>> D is much different (and better IMO)
>> ...
>
> IMO The best way to think about it is that the two approaches are not
> comparable. D templates are a kind of hygienic macro system for
> declarations. Java does not have this. Java generics make the type
> system more expressive. D lacks this kind of expressiveness.

I'd think type erasure techniques make it possible to emulate Java's 
generics in D, whereas D's templates can't be emulated in Java.

Andrei


More information about the Digitalmars-d mailing list