Roger wrote:
> It is not a good idea to use undocumented facilities.
> ... subject to change from one version to the next
Speaking of facilities which change from one version to the next, I have one
more request. Can we restore the previous behavior of
the (documented) facility 4!:4 so that it recognizes local names?
That is, in earlier versions of J, I could get the path to the current script
with :
PATH =: 3 : ' (4!:4<''y'') { 4!:3$0' 0
Note the use of the (predefined) local name y , and note that it permits the
verb to be anonymous. In more recent versions of J,
4!:4 has stopped recognizing local names, so I am forced to write the more
verbose and contingent*:
myPathVerb =: 3 : ' (4!:4<''myPathVerb'') { 4!:3$0'
PATH =: myPathVerb 0
Note that the verb has to know, and quote, its own name.
Now, all that said, this is the only plausible use of 4!:4 on a local name
that I am aware of, and if I had another built-in
facility (foreign) that allowed me to query the name of the current script (or
'' for the IJX window / in immex mode), then this
4!:4-request would be moot and unnecessary (except that consistency is nice).
-Dan
* To borrow a usage from the Category Theory paper Mikael Hall linked to,
http://www.math.harvard.edu/~mazur/preprints/when_is_one.pdf
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm