www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Why does 'string' alias immutable(char)[] and not immutable(char[]) ?

reply spir <denis.spir gmail.com> writes:
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 =E2=98=A3

spir.wikidot.com
Dec 01 2010
parent Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
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
Dec 01 2010