Why I (Still) Won't Use D

Walter Bright newshound1 at digitalmars.com
Thu Mar 27 17:01:39 PDT 2008


Michiel Helvensteijn wrote:
>> No, I don't agree that it is a silly example.
> No one ever used vector<char> as a string and no one ever will.

Yet I'm always left wondering what is the difference between vector and 
string?

>> Why is a string *fundamentally* different from an array? I believe it is a
>> serious mistake to have both. 
> 
> I agree. I like the D approach to strings a lot better than the C++
> approach, as I said in another subthread.
> 
>> I did throw a bone, though, by leaving off valarray<char> :-)
> 
> Why not mention list<char> and deque<char> while you're at it? :-)

Good idea!


>>> I have to agree that C++ has a lot of baggage because of its backward
>>> compatibility. It is its greatest strength and its greatest weakness.
>> True, but that offers no reason to use C++ for new projects. Try writing
>> an internationalized string processing app in C++, and you're in for
>> endless pain and bugs.
> 
> There are toolkits like Qt that will make it a lot easier. Of course, the Qt
> toolkit does this by introducing yet another string type. ;-)

It seems like every C++ library has its own (incompatible) string type. 
I was motivated in D to make the string type good enough to not motivate 
people to invent string classes.



More information about the Digitalmars-d mailing list