string types: const(char)[] and cstring
Walter Bright
newshound1 at digitalmars.com
Sun May 27 16:32:57 PDT 2007
Derek Parnell wrote:
> On Sun, 27 May 2007 12:14:29 -0700, Walter Bright wrote:
>
>> Derek Parnell wrote:
>>> const(char)[] // A mutable array of immutable characters?
>>> const(char[]) // An immutable array of mutable characters?
>>> const(const(char)[]) // An immutable array of immutable characters?
>>> char[] // A mutable array of mutable characters?
>
>
> Any comment on the above?
Looks right to me.
>>> What will happen with the .reverse and .sort array properties when used
>>> with const, invariant, and final qualifiers?
>> They'll all fail.
>
> Good, but when? At run time or compile time?
compile time.
More information about the Digitalmars-d-announce
mailing list