string types: const(char)[] and cstring

Myron Alexander someone at somewhere.com
Fri May 25 21:51:37 PDT 2007


Walter Bright wrote:
> Daniel Keep wrote:
> 
> const(char)[] => array of const characters
> const char[] => const array of const characters
> const(char[]) => const array of const characters
> 
> Think of const as if it were a template:
> 
>     Const!(T)
> 
> which returns a const version of its argument.
> 
> const without any parens means it applies to the whole type.

Looking mighty fine.



More information about the Digitalmars-d-announce mailing list