Splitter quiz / survey

Daniel Keep daniel.keep.lists at gmail.com
Mon Apr 27 05:42:29 PDT 2009



Andrei Alexandrescu wrote:
> ...
> 
> We might just go with the terminator semantics and ask people who need
> separator semantics to use a stripl() or a munch() prior to splitting.
> I'd personally prefer having an enum there.
> 
> 
> Andrei

I'm going to invoke the principle of least surprise here; 6 out of 7
respondents said it should be #4.  The dissenter voted #1.  No one
thought it would be the behaviour as actually implemented. [1]

The problem here is that the word 'split' to me just doesn't mesh with
this terminator business.  I think the default should be the behaviour
that people *expect* it to have.  That, or give the current Splitter a
new name.  Itemize, perhaps?

Also keep in mind that this discrepancy won't show up in trivial
testing.  It won't be until people start getting obscure bugs that
they'll wonder what's going on.

</2c>

  -- Daniel


[1] That's a pretty tiny sample, but you work with what you have. :P



More information about the Digitalmars-d mailing list