John Carmack applauds D's pure attribute

bearophile bearophileHUGS at lycos.com
Tue Mar 6 05:00:11 PST 2012


Manu:

>   It's easy to allocate, ie, nothing to discourage you

This is partially a cultural thing, and it's partially caused by what the language offers you. I have seen Ada code where most things are stack-allocated, because doing this is handy in Ada.
In D stack-allocated variable-length arrays will help move some heap allocations to the stack. And the usage of scoped class instances has to improve some more.


>   Strings... - C coders who reject the stl will almost always have a
> separate string heap with very particular allocation patterns, and almost
> always refcounted

I think in future D will be free to have a special heap for strings. I think that in D source code there is already enough semantics to do this. There is one person that is working on the D GC, so maybe he's interested about this.


> an overwhelming number of C/C++ programmers avoid the stl like the plague (for
> these exact reasons). Performance oriented programmers rarely use STL out
> of the box,

Often I have heard the opposite claims too. Like in the recent GoingNative2012 conference.

Bye,
bearophile


More information about the Digitalmars-d mailing list