DMD 1.004 release

Jarrett Billingsley kb3ctd2 at yahoo.com
Sun Jan 28 08:54:47 PST 2007


"Lionello Lunesu" <lionello at lunesu.remove.com> wrote in message 
news:ephjmf$12sd$1 at digitaldaemon.com...
>
>
> Shouldn't string literals be forced "const"? Even D's limited const could 
> do that. To create a mutable copy you'd be forced to used .dup.
>
> const char[] either = "asdfsadf";
> char[] or = "asdfsd".dup;
>

That wouldn't help, because even if you pass a const char[] into a function 
that takes a char[], that function can still modify it.  The const goes 
away. 





More information about the Digitalmars-d-announce mailing list