[Haskell-cafe] Why is there no "splitSeperator" function inData.List

Donn Cave donn at avvanta.com
Mon Feb 14 18:10:18 CET 2011


Quoth Peter Simons <simons at cryp.to>,
...
> having a dictator is not a necessary prerequisite for the ability to
> make decisions. It's quite possible to decide controversial matters
> without a dictator -- say, by letting people vote.

The problem might be slightly miscast here, as an inability to reach
a decision in the face of controversy, and overall I don't think you
could make much of a case that Python's development is noticeably
more decisive.  If you really have 8 candidates for the semantics
of separator-split, then even if everyone can bring themselves to
agree on one, it's still just one, out of 8 missing functions, and
it's fairly understandable that this might not be very appealing.

Python also
  - is different in that function semantics can be conveniently overloaded
    (I forgot the "count" parameter, I often want that one - split at the
    first (n - 1) locations and leave the remainder intact)
  - is different as a general matter of style and niche
  - doesn't have our division between String and ByteString
  - makes it harder and more expensive to implement string.split()

Anyway, before it gets to the point where the crowds are camping in
the city square and demanding a vote, it might be interesting to see
where the code comes down on the matter, so I looked at the hackage
source I already happen to have at hand, a measly 252 Haskell source
files.

I found one (1) separator-split implementation.  I was surprised
at so few, as I've done it myself several times, so maybe I happen
to have an unrepresentative sample?

	Donn



More information about the Haskell-Cafe mailing list