COW vs. in-place.
Sean Kelly
sean at f4.ca
Wed Aug 2 17:59:30 PDT 2006
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.
Why not:
str = toupper(str); // in-place
str = toupper(str.dup); // COW
or alternately:
char[] toupper(char[] src, char[] dst = null);
where dst is an optional destination argument.
Sean
More information about the Digitalmars-d
mailing list