bill lam-2 wrote:
> 
> On Sat, 16 May 2009, Tracy Harms wrote:
>> invocation, and verbs must be defined prior to execution.
> 
> IIRC undefined name are treated as verb. Suppose b is not yet defined,
> 
>    a=: 3 + b
>    a
> 3 + b
>    b=: 1
>    a 10
> |domain error: b
> |       a 10
>    b=: *:
>    a 10
> 103
> 
It's a bit more complicated. b is more like a free variable of universal
type,
which means it can become anything: noun, verb, adverb or conjunction.

Such semantics is unusual (I can think only of Mathematica here), 
and the up side is that some things, like mutually recursive verbs, or
parametric verbs, are easy to define, but the down side is that we 
don't know whether some expression with such a free variable will become
well formed in the course of further interpretation or not, just as your
example
illustrates.  

Another apparently similar, but meaningless, expression is:
   c=:d+1
|value error: d
|   c=:    d+1


-- 
View this message in context: 
http://www.nabble.com/J-and-referential-transparency-tp23580460s24193p23586159.html
Sent from the J Programming mailing list archive at Nabble.com.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to