Dan, The first programming language I ever learned (self-taught) was APL (back in 1974), and it was there that I first encountered dyadic iota.
Perhaps it was because I was self-taught that I developed what are probably idiosyncratic ways to remember what all those symbols meant and how to use them. For most of them, it involved coming up with a short phrase to describe them. Thus for epsilon I used, "Is x in y?". Using "Is..." also helped me remember that the result was Boolean. And for iota, I came up with, "In x, where do I find y?". It seemed "natural" (to me at least), and I didn't really stop to think about whether or not the order of the arguments was consistent with the "general" APL rule that the thing being acted on is (usually) y and the thing that tells you how to act on it is (usually) x. I think part of the reason Ken, Adin, et. al., chose the symbols they did was to be as consistent as possible with the existing use of those symbols in logic or mathematics, as well as for their mnemonic value (iota <=> integers, indices). I see your point about inconsistency, but personally, it never caused me the discomfort it seems to have caused you. Perhaps I am simply too accepting about such things. But what is "natural" is probably in the eye (ear? brain?) of the beholder. /Chris Lett -----Original Message----- From: Dan Bron [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 17, 2007 1:06 PM To: General forum Subject: Re: [Jgeneral] "J for C Programmers" - asymmetry /control /datadiscussed without definition? BL=Bill Lam, RH=Roger Hui BL> comparing dyad e. and i. I think that i. is abnormal, not e. RH> What are some reasons for your assertion? Let's take a poll: Who on this Forum, was not confused (or at least surprised) by the order of arguments to i. when you first encountered it? (Or APL's iota, if you came across that first?) One of the most persistent of my early J frustrations was remembering the order of arguments to i. . Long after I (finally!) memorized the meanings of and differences between {. {: }. }: , I was still stumbling over the order of arguments to i. . I even had a definition in my utilities i =: i.~ . It wasn't that I learned e. first and that tinted my expectation of i. . Nor had I encountered an i. analog in previous context, which might've trained me to expect "the universe" to be on the right. There was no precedent. It was just a "natural" expectation. I suspect that's why e. is what it is today: decades (years? centuries? millennia?) of mathematical history has shaped the epsilon notation, and the universe is on the right. Even in casual conversation, we say things like we say "x is a member of y" , where x is the member and y is the universe. Similarly, we say "lookup x in y " or "give me the indexes of x in y". Now, I do agree that since J executes verbs from right to left, it is sensible to design verbs such that their right arguments are the ones most likely to be calculated (not known in advance). This avoids excessive parenthesization or commutation. But that doesn't invalidate the argument that people "naturally expect" the right argument of i. to be the universe, or that that expectation is unimportant. After all, J concedes to expectations for e. and % . Perhaps, like the factorial function, the argument order of e. is a historical accident, resulting in an ugly, inconsistent wart. OTOH, perhaps there are psychological reasons underlying the choice of argument order, and given human nature, universe-on-the-right was inevitable, and subverting always causes cognitive dissonance. Maybe the poll support one theory over the other. -Dan ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
