1. I don't find 'a b c' any uglier than {{a b c}} . Matter of opinion,
of course.
2. I think the general-DD idea needs some working out:
a. Are ALL names on the first line required to match arguments?
b. What about other lines in the definition?
c. Can named non-nouns be used in the first line? How would they be
distinguished from arguments?
Henry Rich
On 11/3/2020 11:07 AM, John Baker wrote:
I had a little brain fart this morning. What might it mean to assign
direct definition forms?
In current J we have the ugly but extremely useful form:
'this stuff gets array items'=: arr
The names get parsed in the string and assigned corresponding array items.
This has been in J forever and is so handy we tolerate the hideous QUOTED
code.
Suppose:
{{this stuff gets array items}}=: arr
No more ugly quoted code. But why stop there, consider a general DD with
unbound names.
{{this * that ^ more}}=: arr
One way to approach this is to treat the names in the DD like a regular J
expression accessing global names in it's namespace.
The names are bound by matching corresponding names with array items, just
like the current 'this that more'=: array, and then the expression is
evaluated as always.
This opens up a world of possibilities like:
{{+/a * b % c ^ d - e}}=. {{5 # this * that ^ more}}=: arr
This is only a slight generalization of what's already in J. I'm not
suggesting immediate implementation - just curious as to what others may
think.
--
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