string is rarely useful as a function argument

Peter Alexander peter.alexander.au at gmail.com
Wed Dec 28 10:35:14 PST 2011


On 28/12/11 6:15 PM, Walter Bright wrote:
> On 12/28/2011 10:07 AM, Peter Alexander wrote:
>> The question is whether string should alias immutable(char)[] or
>> const(char)[].
>> In my experience (which is echoed in Phobos) is that const(char)[] is
>> used much
>> more often than immutable(char)[], so it should alias const(char)[].
>
> If such a change is made, then people will use const string when they
> mean immutable, and the values underneath are not guaranteed to be
> consistent.

Then people should learn what const and immutable mean!

I don't think it's fair to dismiss my suggestion on the grounds that 
people don't understand the language.


More information about the Digitalmars-d mailing list