Often you need for a verb to refer to the value of a name when the noun is executed, rather than when it is defined.  So, rather than

npixels =: */ windowsize

which would just be a noun, you write

npixels =: 3 : '*/ windowsize'

to defer taking the value of (windowsize) until (npixels) is executed.

In tacit code, you used to write

npixels =: */ @: ". @ ('windowsize'"_)

to get the same result.  Recently the syntax was added to allow

npixels =: */ @: ". @ 'windowsize'

All that still works.  But the (".) verb starts the parser and executes its y argument as a sentence, with a modest overhead that will matter if the verbs have small ranks.  Now, you can write

npixels =: */ @: (". @ 'windowsize')

[parentheses important! make sure you see why].  When (npixels) is defined, this form will detect that the argument to (".) is a single name.  When (npixels) is executed, the name will be evaluated without going through the overhead of starting a sentence.

Henry Rich





On 8/23/2018 8:49 PM, Brian Schott wrote:
Henry,

What does this new feature mean/do? Could you give an example, please?

[x] ".@'name' y improved.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


---
This email has been checked for viruses by AVG.
https://www.avg.com

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

Reply via email to