Why I (Still) Won't Use D

Michiel Helvensteijn nomail at please.com
Thu Mar 27 12:04:12 PDT 2008


Benji Smith wrote:

> CONST

I think most people will agree with you here.

> STRINGS
> 
> ...
> 
> I would have liked to see just one string type, with encoding kept as an
> internal implementation detail. And I'd much rather have a string class
> than to treat strings as character arrays

In fact, I thought that using char[] instead of a class as the string type
(with a type alias 'string', of course), was a great idea in the case of D.
In C++ it doesn't work so well, because arrays there are just pointers,
don't know their own size, and cannot grow dynamically. So a class was the
natural solution.

But D arrays can do all those things, and they even have nice syntactic
advantages like slicing, concatenating and function-dot-notation. So I
don't see a reason to use a class here.

> (especially since indexing/slicing deals with code-points rather than
> character positions). 

I'm not quite sure what you mean by this. What are code-points?

> KEYWORD OVERLOAD

Agreed.

> ARRAYS

Agreed, mostly. Though D arrays are a whole lot prettier than C++ arrays.

> ANYHOW...
> 
> ...
> 
> I feel like, if I'm going to use such a complex language, I may as well
> choose C++, which offers the advantages of ubiquity and language
> stability.

This is the exact reason I'm still choosing C++ over D.

I suppose you could restrict yourself to D 1.0. I'm told the newest D is a
development version only. However, I don't feel easy using it for big
projects knowing the direction D is taking.

-- 
Michiel




More information about the Digitalmars-d mailing list