Steven Schveighoffer wrote:
On Mon, 27 Apr 2009 09:43:40 -0400, Andrei Alexandrescu
<[email protected]> wrote:
Jason House wrote:
Before reading your post, I was going to say that I'd expect 4, would
accept 1, and consider 2 or 3 to be buggy! Notice how under your new
proposal everyone would still get the behavior wrong when reading the
code.
everyone posting heavily in thiss group != everyone
Not that I care, because I don't use phobos, but you haven't really
presented any good argument that your method is the most intuitive except:
1. Some example of badly written code that outputs extra spaces (I don't
consider this to be common).
2. Perl does it that way.
The way I see it is: when I see a function named "splitter", I think the
function splits a string based on identified token separators. If you
don't think of it that way, fine, you have every right to design Phobos
however you want, despite the fact that 100% of respondants surveyed (so
far) don't agree with your intuition.
I have never thought of a list of tokens with terminators vs.
separators. I think what you should have as an option to split is to be
able to ignore leading or trailing empty items, not "seperator is really
terminator" enums, which would require a paragraph of explanation.
An after-the-fact thought: if the function is called "splitter", then
one unavoidably starts thinking about separators. And not terminators.
Had the function been called "separate" or something else, then the
notion of "something in between" hadn't been that strong.