I think the ¥ and Y operators are going to have to change to something else.
The current Y has at least four strikes against it:

    * It's an ASCII version of a cute Unicode picture, but other than that,
        the picture it doesn't remind you of "zip" at all, especially in
        the Y form.

    * Functional programmers are likely to continually confuse it with the
        Y combinator, and they'll be confused enough as it is.

    * It violates the item-vs-list meme that we acquired with x vs xx and
        X vs XX.

    * Huffmanly speaking, it's rather short for its weight.

Those last reasons suggest that we want something spelled with a double
letter like XX.  I thought about replacing it with YY (and letting Y
be the string form of zip), but that looks even less like a zipper.
But I do like the double letter idea for infix listops.  It helps them
stand out more.  I suspect we'll have a lot of

    for @foo XX @bar XX @baz -> $x, $y, $z {...}

as list comprehensions of cross operators, so you'd like to have something
similar for "zip" semantics, and I think the obvious thing is:

    for @foo ZZ @bar ZZ @baz -> $x, $y, $z {...}

You'll note that this has association of using the same letter, but
for those who mourn the loss of the word picture, note that the two
Z's form a pair of parallel lines in the middle, indicating that zip
treats the arrays in parallel.  Plus the Z itself can be taken to be
a picture of "row major" visitation order: "first you go across, then
go to the beginning of the next row, then go across again."

The Z operator would presumably be the equivalent of >>~<< except that,
as a list infix, it would take a list on either side rather than two
scalar objects as hyperops do.

One could go as far as to say that Z*Z is the list infix form of >>*<<.

Anyway, I think we're close to establishing a convention that a list
infix should generally be formed from two capital letters, with the
additional proviso that if the list infix promotes to a meta operator,
the base operator goes in the middle.  And if there's a stringwise or
scalar form, it's the single letter.

'Course, if someone goes ahead and adds the Y combinator, one must
naturally begin to wonder what the YY combinator would be...  :-)

Larry

Reply via email to