Article about problems & suggestions for D 2.0

Daniel Murphy yebblies at nospamgmail.com
Sat Aug 27 12:47:44 PDT 2011


"Mehrdad" <wfunction at hotmail.com> wrote in message 
news:j3beu2$25a8$1 at digitalmars.com...
> Related suggestion: All methods that return /new/ strings should return 
> *mutable* arrays. There's really no reason (that I can think of) to not do 
> this: if you see something returning a mutable array, you _know_ it's a 
> new array (unless otherwise documented), so you _know_ it's safe to cast 
> it to immutable if needed. It doesn't work the other way around, though.

Since a few days ago, mutable strings returned from strongly pure functions 
can be implicitly converted to immutable ones, so a cast won't be needed any 
more. 




More information about the Digitalmars-d mailing list