First Impressions

David Medlock noone at nowhere.com
Fri Sep 29 06:00:38 PDT 2006


Derek Parnell wrote:
> On Fri, 29 Sep 2006 01:24:50 -0700, Walter Bright wrote:
> 
> 
>>Derek Parnell wrote:
>>
>>>On Fri, 29 Sep 2006 10:23:32 +1000, Geoff Carlton wrote:
>>>
>>>>I was a bit underwhelmed by the syntax of char[].
>>>
>>>Yes. It isn't very 'nice' for a modern language. Though as you note below a
>>>simple alias can help a lot. 
>>>
>>>   alias char[] string;
>>
>>On the other hand, the reasons other languages have strings as classes 
>>is because they just don't support arrays very well. C++'s std::string 
>>combines the worst of core functionality and libraries, and has the 
>>advantages of neither.
>>
>>An early design goal for D was to upgrade arrays to the point where 
>>string classes weren't necessary.
> 
> 
> And is it there yet? I mean, given that a string is just a lump of text, is
> there any text processing operation that cannot be simply done to a char[]
> item? I can't think of any but maybe somebody else can.
> 
> And if a char[] is just as capable as a std::string, then why not have an
> official alias in Phobos? Will 'alias char[] string' cause anyone any
> problems?
> 
I just quickly want to interject my wish for aliases for the basic 
string array types.

-DavidM




More information about the Digitalmars-d mailing list