I hate ".dup"

BCS none at anon.com
Mon Mar 23 09:15:20 PDT 2009


Hello Qian,

> Oh god. I have to add ".dup" at the end of every string to avoid
> potential program errors. This is so incredible....
> 

Run it on linux and it will seg-v when you try to access a literal string.

Oh, and that issue is in no way unique to D. Any language with mutable strings 
will have it and any language without will force the copies anyway (but with 
better syntax)




More information about the Digitalmars-d-learn mailing list