First Impressions

David Medlock noone at nowhere.com
Fri Sep 29 20:12:08 PDT 2006


Walter Bright wrote:
> Derek Parnell wrote:
> 
>> 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.
> 
> 
> I believe it's there. I don't think std::string or java.lang.String have 
> anything over it.
> 
>> 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 don't think it'll cause problems, it just seems pointless.

The reason *I* want it is _alias_ does not respect the private: 
visibility modifier.

So when I pull out an old piece of code which says

alias char[] string

and import it in my newer module I get conflicts when I compile.

Then I must do this silly hack where I include the newer file from the 
old or vice versa.

If you didn't add this into phobos, at least or adopt a method to 
discriminate between more than one alias with the same name to resolve 
the issue.

-DavidM



More information about the Digitalmars-d mailing list