Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uunet.ca!geac!itcyyz!yrloc!hui
From: hui@yrloc.ipsa.reuter.COM (Roger Hui)
Subject: Re: Function evaluation in J
Message-ID: <1992May3.023638.20940@yrloc.ipsa.reuter.COM>
Organization: Iverson Software Inc.
Date: Sun, 3 May 92 02:36:38 GMT
Lines: 40

Konrad Hinsen writes:
> In fact I do understand the notation (mv mv mv), but I have a
> somewhat different idea of the meaning of the word "is".
 
It is common practice in mathematics to redefine the meaning of "is",
"equal", "is the same as", etc.  Thus the set {1,2,3} is the same as
{3,2,2,1,1,1}; the rational numbers 3%4 and 6%8 are equal; the real
numbers 1 and 0.99999 ... are the same; and in APL, 1=log exp 1
despite finite-precision floating-point representation.  As I said,
the dictionary definition
 
  COMPOSE (mv mv mv) u&v y is u v y and x u&v y is (v x)u(v y).
 
is for x and y with ranks bounded by mv.
 
> The dictionary doesn't say that <@|.@> c is equivalent to
> '<|.>y.':''"0 c (which would be clear enough for me), but that it
> is equivalent to <|.>c, which as it stands is wrong. ...
 
The dictionary does not say anywhere that <@|.@>c is equivalent
to <|.>c.  It does say that "ATOP (mv) u@v y is the same as u&v y"
which, when combined with the COMPOSE definition above, means that
u@v y is the same as u v y for y with rank bounded by mv.  Thence
one can derive the property that <@|.@>c is indeed equivalent to <|.>c,
for atomic c.
 
> To get the correct interpretation, I must have read and remembered the
> section about ranks, must have remembered how ranks are indicated
> in the dictionary, must realize that the definition given can't
> be the whole truth because the ranks do not agree with the
> rank specification for @, ...
 
In other words, the definition of @ must be understood in context.
(Said context within a document of only 18 pages.)  As I said, since rank
is uniform and pervasive, it is discussed at the front, and not repeated
for every dictionary entry.

------------------------------------
Roger Hui, Iverson Software Inc., 33 Major Street, Toronto, Ontario  M5S 2K9
Phone: (416) 925 6096;  Fax: (416) 488 7559
