[Jprogramming] J and referential transparency
Don Guinn
donguinn at gmail.com
Tue May 19 09:19:18 HKT 2009
On Mon, May 18, 2009 at 6:25 PM, Viktor Cerovski
<viktor.cerovski at gmail.com>wrote:
>
>
> So to establish referential transparency, we should also do u=:u f.
> after u has been defined.
>
That's one of the nice features of tacit programming. You can build a
complex tacit definition by building it from several simpler tacit
definitions then use f. to make the final definition all primitives. But
there are times you want to keep the reference to an external name so it can
be changed as processing progresses. There should not be a reinterpret
necessary if the name does not change class. This is similar to what is done
in OOPS. But I prefer to use adverb and conjunction definitions then pass
the named definition as an argument. Looks cleaner to me. But that's just my
opinion.
More information about the Programming
mailing list