December 01, 2010 Why does 'string' alias immutable(char)[] and not immutable(char[]) ? | ||||
---|---|---|---|---|
| ||||
Well, nearly everything is in the title... I would intuitively opt for the second type if I had to define an immutable string type. Answers from various points of view (semantic, praticality, efficiency...) would be great if ever they may differ. denis -- -- -- -- -- -- -- vit esse estrany ☣ spir.wikidot.com |
December 02, 2010 Re: Why does 'string' alias immutable(char)[] and not immutable(char[]) ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to spir | Don't know about you, but I liked being able to write
s += "hi";
On 12/01/2010 05:17 AM, spir wrote:
> Well, nearly everything is in the title... I would intuitively opt for the second type if I had to define an immutable string type.
>
> Answers from various points of view (semantic, praticality, efficiency...) would be great if ever they may differ.
>
> denis
> -- -- -- -- -- -- --
> vit esse estrany ☣
>
> spir.wikidot.com
>
|
Copyright © 1999-2021 by the D Language Foundation