replaceFirst, findPieces, and takeExactly

Daniel Gibson metalcaedes at gmail.com
Sat Jan 22 19:49:51 PST 2011


Am 23.01.2011 04:42, schrieb spir:
> 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.
>> There will be a few more of these split functions i suppose and this is
>> the reason of my proposal splitAt.
>> It is in the definition of the function you quoted.
>>
>> "(Split) the string (at) the first occurrence of (sep)"
>  >
>> splitAt(string, sep)
>
> +++
>
> splitAt is simply a Good Name! (even better than "tripartite" ;-)
> Also for finding it in list of funcs.
>
> Denis
> _________________
> vita es estrany
> spir.wikidot.com
>

To be honest, tripartite sounds kind of strange.
I don't know why, but I think of spiders when I read it ;)


More information about the Digitalmars-d mailing list