Newsgroups: comp.lang.apl
Path: watmath!ljdickey
From: ljdickey@math.uwaterloo.ca (L.J. Dickey)
Subject: Re: J Question: $:
Message-ID: <Bsun7q.66K@math.uwaterloo.ca>
Organization: University of Waterloo
References: <1992Aug11.211521.14504@csus.edu>
Distribution: NA
Date: Wed, 12 Aug 1992 02:35:49 GMT

In article <1992Aug11.211521.14504@csus.edu> vpcsc4@sfsuvax1.sfsu.edu (Emmett McLean) writes:
>  A few J questions:
> [ ... some things deleted ]

>3. In the explicit verb fb, below, is there a way to use the 
>   self reference $: instead of invoking fb?
>
>   item0 =. >@(0&{)@]
>   item1 =. >@(1&{)@]
>   old_item0_nsuccessor =. <@ (item0 , (>:@{:)@item0 )
>   
>   fb
>+------------------------------------------+-++
>|".(( {:@item0 = item1 ) y.)#'$.=. end'    |:||
>| y.=. fb (old_item0_nsuccessor y.) 0 } y. | || <<Use $: here>>
>| end) y.                                  | ||
>+------------------------------------------+-++

	In early versions of J, self reference could be used
		in verbs defined explicitly.
	In more recent versions, self reference may be used
		in verbs defined tacitly.

I think that a choice has to be made, because a user may have
an explicitly defined verb that contains within its text the
definition for a tacitly defined verb.  Maybe the interpreter
should be able to detect when this is not the situation, and
"do the right thing".

-- 
Prof. Leroy J. Dickey, Faculty of Mathematics, U of Waterloo, Canada  N2L 3G1
   Internet:      ljdickey@math.UWaterloo.ca
                  ljdickey@math.waterloo.edu
   UUCP:          ljdickey@watmath.UUCP
