Splitter quiz / survey -- PLEASE NO

Brad Roberts braddr at bellevue.puremagic.com
Mon Apr 27 11:34:10 PDT 2009


On Mon, 27 Apr 2009, Andrei Alexandrescu wrote:

> I have been convinced. I will modify splitter to do (4), i.e., prepend or
> append an empty element if there's a leading, respectively trailing,
> separator. Thanks to all for destroying me :o).
> 
> Actually, Brad, since it was your idea, I suggest you to operate the change
> and add yourself to the list of contributors to std.algorithm.
> 
> I have constructed an information-theory-based argument that was alluded to by
> some posters without being clearly stated: if splitter does (4) and the
> separator is a character or a string, then you can reconstruct the original
> input from its output. So (4) is the behavior that loses the least
> information. (Brad was on a similar track by stating that it's desirable for
> splitter to produce the same number of items whether ran forward or in
> reverse.)
> 
> Andrei

I'll try to get to it tonight, but no promises.

Later,
Brad



More information about the Digitalmars-d mailing list