On 30 Aug 2000 01:22:40 -0000, Perl6 RFC Librarian wrote:

>Builtins: merge() and demerge()

???

>It is proposed that two new functions, C<merge>, and C<demerge>, be added
>to Perl. C<merge(@list1, @list2, ...)> would return a list that
>interleaved its arguments. C<demerge($num_lists, @list)> would reverse
>this operation.

Ah, now I understand. I did read the previsious discussion, not even 3
weeks ago. Yet, the word "merge" did not ring a bell. Even though
"merge" a very short word, I find it far too generic. You'll constantly
forget what it is supposed to do, especially if you don't use it on a
weekly basis.

And if you can describe what a function is supposed to do in just one
word, that word should be the obvious choice for the name. That word is
"interleave":

        "merge would return a list that interleaved its arguments".

The word may be long, but at least it's very clear.

As for the opposite... I'm not sure that the names should even be
related.

I have been thinking about a game of cards, where one person divides the
cards amongst the players, by giving each one card at a time. Isn't this
exactly what is happening here? The English word, in a cards game, is
"deal". But that word, again, is a bit vague.

-- 
        Bart.

Reply via email to