COW vs. in-place.
BCS
BCS at pathlink.com
Mon Jul 31 11:12:51 PDT 2006
Dawid Ciezarkiewicz wrote:
> Dave wrote:
>
>
>>What if selected functions in phobos were modified to take an optional
>>parameter that specified COW or in-place? The default for each would be
>>whatever they do now.
>>
>>For example, toupper and tolower?
>>
>>How many times have we seen something like this:
>>
>>str = toupper(str); // or equivalent in another language.
>>
>>Thanks,
>>
>>- Dave
>
>
> I don't get it (the example).
>
> str = toupper(str);
>
> does not mean that str can be modified in place
>
how about:
str[] = toupper(str)[];
More information about the Digitalmars-d
mailing list