Yes, I was confused by the order of arguments to i. . I still get it backwards quite a bit. I think it's because I see i. and think 'in'.
But i. conforms to the general rule, which is the most important think I think. You can't survive long in J if you expect the language to do things the way you're used to! I wish e. conformed, though. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dan Bron > 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
