1 : 'a u ]' is adverb that returns an anonymous and probably tacit verb. I say "probably" because u could be explicit, but the term tacit still seems appropriate to describe the overall expression.
1 : 'a u y' is an adverb that executes its explicit definition in the caller's locale. It could be stated as it is not evaluated until it is passed y, or it is bound with its unsubstituted definition. In the first example, a will be evaluated (and substituted with a constant) in the adverb's locale. In the second, a will be evaluated in the caller's locale. So, IMO, its worth calling these 2 different types of adverbs. Something purely tacit such as @] is still like the first type of adverb I use the term modifiers, because this distinction applies equally to conjunctions. conj_t_ =: 2 : 'a + v + u ' conjE_t_ =: 2 : 'v + u +a + y' +: conj_t_ +: 2 + +: + +: +: conjE_t_ +: +: (2 : 'v + u +a + y') +: NB. what is returned no longer has any reference to t locale. I understand the nounconj reference makes for a distraction on a seldom considered topic, but it seems like a separate enough type of modifier a2_t_ =: 1 : 'u a' +: a2_t_ 4 NB. returns noun +: 1 : 'u a [y' +: (1 : 'u a [y') NB. returns verb phrase that will be parsed/executed and use a in base/caller the following seems like a bug to me, a =: 6 NB. in base +: a2_t_ =: 1 : 'u a' NB. seems to pre-optimize to get a from base. Though behaviour is correct if defined on separate line in base. 12 erase 'a' 1 +: (a2_t_ =: 1 : 'u a') +: a ----- Original Message ----- From: Raul Miller <[email protected]> To: Programming forum <[email protected]> Cc: Sent: Wednesday, September 17, 2014 2:00 PM Subject: Re: [Jprogramming] OOJ and calling a verb from another locale Reading that article, I stall when you say "Even if they are defined with 1 : or 2 : , the first 2 types of modifiers should be considered tacit," I do not know what you are referring to by the phrase "the first 2 types of modifiers". Do you mean "the first 2 types of adverbs (or conjunctions)" or are you referring to nounconj and nounconj2? If the latter, I think the statement is erroneous. If the former, I'm a bit dubious about the distinction. The concept of tacit is slippery enough that it's probably worth quoting the definition you are using, and describing what it is about the context that makes "tacit" a relevant concept whenever we talk about it. Anyways, I got stuck there, and I thought you should know. Thanks, -- Raul On Wed, Sep 17, 2014 at 12:54 PM, 'Pascal Jasmin' via Programming <[email protected]> wrote: > You may find this article helpful: > http://www.jsoftware.com/jwiki/PascalJasmin/3%20types%20of%20adverbs%20conjunctions%20and%20binding > > These are indeed issues you understand by surprise (why is this code not > doing what I meant it to do) comming from other languages. > > > ----- Original Message ----- > From: Brian Schott <[email protected]> > To: Programming forum <[email protected]> > Cc: > Sent: Wednesday, September 17, 2014 12:05 PM > Subject: Re: [Jprogramming] OOJ and calling a verb from another locale > > Pascal, > > I especially liked the point you made below. I think such a point would be > very appreciated by new J programmers and may not be well known. > > > > > "... In J, the verb (2 + myvar"_) will produce a constant verb based on > the value of myvar at definition, while (2 + 3 : 'myvar') will obtain the > latest value of myvar. ..." > > > > > -- > (B=) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
