string types: const(char)[] and cstring

Walter Bright newshound1 at digitalmars.com
Sat May 26 00:24:27 PDT 2007


Reiner Pope wrote:
> Also, I can't see any difference between const(char) and 
> invariant(char), since neither can ever be rebound. In that case, if I 
> assume that they are identical types, how can an array of const(char) be 
> different from an array of invariant(char)?

The difference is when they are reference types, such as arrays of const 
char, or arrays of invariant chars.



More information about the Digitalmars-d-announce mailing list