std.stringbuffer
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Thu May 1 06:58:15 PDT 2008
Janice Caron wrote:
> 2008/4/30 Bruno Medeiros <brunodomedeiros+spam at com.gmail>:
>> Also, is there a reason why these mutable functions shouldn't be in
>> std.string, together with their invariant/const brethren?
>
> That's why we're having this discussion.
>
> The idea is that std.string can be optimised for invariant strings,
> while std.stringbuffer could be optimised for mutable strings. There
> are pros and cons for separate modules. I don't think Walter wants
> std.string "polluted" by all these functions he doesn't much care for.
> Also, it would be bad if mutable versions were called "by mistake"
> with consequent unexpected behavior.
>
"mutable versions were called "by mistake" "? I don't think that point
applies to D, after all, the purpose of the immutability system is for
the compiler to check that this won't happen, so unless there is some
compiler bug, that shouldn't happen in D.
> But keep discussing. The people I want to hear from most are the
> people calling for mutable string functions.
You may find that a large segment of those people are using Tango, and
so they might not participate much in this Phobos design issue discussion.
--
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list