What's wrong with D's templates?

grauzone none at example.net
Mon Dec 21 23:33:09 PST 2009


Walter Bright wrote:
> I can expound on the huge advantages immutability and purity offer, if 
> you want.

Yes, I'd like to hear about this. You can leave away the things that are 
not going to be implemented (like memorization of pure return values), 
are only micro-optimizations (common sub-expression elimination with 
pure functions?), which don't work (immutable was used to make strings 
read-only, but you can stomp over immutable arrays), which were thought 
to be useful, but nothing has materialized yet (something like immutable 
was supposed to be the cure for multithreading)...

Over two years have passed since immutable/const was added to dmd, but I 
couldn't see any benefit yet. But lots of new compiler bugs. There's the 
danger that those feature are all nothing but hot air in real 
programming. I like D, and it sure would relief me to hear that this is 
not the case.



More information about the Digitalmars-d mailing list