Article about problems & suggestions for D 2.0

dsimcha dsimcha at yahoo.com
Sat Aug 27 13:31:56 PDT 2011


On 8/27/2011 3:47 PM, Daniel Murphy wrote:
> "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.
>
>

Does the same apply to all arrays of primitives?


More information about the Digitalmars-d mailing list