Ian Clark wrote:
> Right, so you either write 'TT' into the string of an explicit
> definition (when it gets bound to the current TT at call-time) or you
> write something like ".@('TT'"_) .
Right; tacit code is functional. Functional code, given the same inputs,
always produces the same outputs. By definition, it can neither rely on nor
produce side effects. Which means tacit verbs cannot refer to mutable nouns
(or, alternatively, the only mutable nouns which can change the output of a
tacit verb are its arguments -- which it does not refer to :).
Lest anyone be led astray, ". is a J interpreter. So ".'something' is
liking typing something into the IJX window (in the current context,
equivalently to in debug mode). So ".'something' is only tacit if something
is tacit. But since ". is a verb, it can only return nouns, and so
something must be either be a noun phrase (which isn't tacit because arguments
are mentioned, though parts of it can be tacit) or a side effect (such as an
assignment or host interaction) which isn't functional, and hence isn't tacit.
Embedding ". bind 'something' into your tacit code renders it non-tacit (or
non-completely tacit, which may be the same thing, depending on your orthodoxy
-- I mean perspective).
I elaborated a bit on this in [1]; but it's spread throughout the thread a bit.
The moral of that story was if you want to refer to mutable data, be up front
about it (i.e. explicit).
-Dan
[1] http://www.jsoftware.com/pipermail/programming/2009-August/016123.html
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm