replaceFirst, findPieces, and takeExactly

spir denis.spir at gmail.com
Sat Jan 22 19:49:30 PST 2011


On 01/23/2011 12:40 AM, so wrote:
>> Yes, I'm absolutely in agreement with the naming (and thrilled too). I
>> imagine a putative user looking through std.algorithm ("let's see...
>> what find functions are out there?"). That makes findPieces easy to
>> get to, whereas "trisect" would be oddly situated in the alphabetic
>> list and oddly named enough to be virtually undiscoverable.
>
> If this is the reasoning. This is a split function, not a find.

Agreed, the function does not belong to the sub-list of find*, instead 
to split*. So's proposal "splitAt" not only respects that, but tells 
more accurate information. "findPieces" does not tell anything, thus 
anyone would expect it to cut the string into an arbitrary number of pieces.

Denis
_________________
vita es estrany
spir.wikidot.com



More information about the Digitalmars-d mailing list