d future or plans for d3

bearophile bearophileHUGS at lycos.com
Tue Dec 20 04:14:47 PST 2011


Froglegs:

> Still it seems like a case of "you pay for what you don't use",

That's a design rule for C++, but D is a bit different :-)
Often in D there are ways to not pay what you don't use, but you have to ask for them. If you don't ask for those ways, you usually need to pay a little, and you get a program that's safer or more easy to debug. 

So for D the rule is more like "Safety on default, and unsafe (and cheap) on request".


> and seems like a real downer for adopting D since you loose the 
> ability to use lambda's without having the GC shoved down your 
> throat

In theory in D there is a way to use (at the usage site) static delegates, that don't allocate a closure on the heap. I don't know if now this feature is fully correctly implemented, but if not it's planned.

Bye,
bearophile


More information about the Digitalmars-d mailing list