D - more or less power than C++?
Walter Bright
newshound at digitalmars.com
Fri Mar 3 22:15:53 PST 2006
"Miles" <_______ at _______.____> wrote in message
news:dub8id$2rn3$1 at digitaldaemon.com...
> I hardly post anything to the NG, most of the time I just read to see
> how D is maturing... but I would like to leave my opinion on this subject:
It's good to hear the opinions now and then of the lurkers, too, as they are
just as important as the prolific posters.
> 1. const parameters and member functions
>
> Countless times this saved me. I just can't imagine references being
> passed in and out of functions without something explicitly saying that
> the function is expected or not to modify it.
>
> 2. implicit function template instantiation
>
> D templates are great, but I miss just this one feature. Perhaps because
> that I'm too used to C++...
They're coming.
> 3. array literals and initialization
>
> Don't know how D still don't support this, while we see things like
> regexes and scope guard comming in... (not that I didn't like those
> features, but I think that array literals should have came first).
C++ doesn't have array literals either <g>.
> 4. library
>
> This is a really weak point in D. STL is not that great, and I can't
> imagine someone programming in C++ without using some additional library
> like boost, CC++, Qt, MFC or (that Borland one that I just forgot the
> name)... But Phobos is simply out-of-question, it was created without
> project (I'm not a Software Engeneering fan, but at least I understand
> the importance to design and document before coding).
I don't find the STL compelling, either, and that's the only library thing
standard C++ has over libc. Furthermore, large chunks of STL are simply
irrelevant in D because D has core arrays, strings, and associative arrays.
> Also, the standard library should rely on the operating system, not on
> libc.
D is meant to be compatible with the C ABI, and that means supporting libc.
Beyond that, it doesn't make a whole lot of sense to, for example, duplicate
printf's ability to format floating point numbers. That code is complicated
but well tested, why not take advantage of it? The libc stuff that isn't
good is ignored.
> Now a bit off-topic, I'm also one of the guys that would like to see
> true, pure booleans in the language. I don't know why D should inherit
> such stupid behavior from C/C++, and the excuse that "D should be a
> sucessor to C" does not get at all... I believe that, before being a
> sucessor to C, D is a completely *new* language, no one will code in D
> with just C knowledge. So, if we are going to make things again, lets
> make them right.
>
> Best regards,
> Miles.
More information about the Digitalmars-d
mailing list