D 2.0 and C++0x

bearophile bearophileHUGS at lycos.com
Thu Apr 24 04:28:11 PDT 2008


Walter Bright:

>Here's a feature-by-feature comparison of what's slated for C++0x vs what's already in D:<

A very nice list.
C++ is a very complex language, so sometimes D designers may choose to not put in D few of the most complex, tricky, or difficult to use features of C++. Sometimes a bit less power may be better.


>Adding extended integer types to C++ N1988: D has the cent and ucent types for 128 bit integral types (not implemented in dmd or gdc). There is no proposal for other extended integral types, but it's hard to imagine a justification for adding more to the core language.<

I don't see where cent and ucent types can be useful.
But I think a built-in compiler-optimized multiprecision integer type may be useful in many situations, for example where you need more safety in integer operations.


>(monomorphic) Lambda expressions and closures for C++ N2550: D has lambda expressions and closures.<

I think I'd like a shorter syntax for lambdas in D, C# lambda syntax is nice (but it requires a bit more type inferencing).


>Initializer lists N2531: D has struct literals, array literals, and associative array literals.<

But they have some problems still :-)

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list