The two fundamental changes in J6, the renaming of explicit arguments and the
new train NVV, share a common trait: they make pseudo code truer (this is a
another way of saying they're good notation). I've been trying for a couple of
weeks to come up with a way to articulate this clearly, but I've failed. So
I'll punt and give some examples.
For example, we used to say "the argument must have 2 > # ", which we
intended as shorthand for " assert. 2 > # y. " . But now 2 > # is
executable and has the meaning we intend. This is on par with f + g <==> (f
y) + (g y) .
Similarly, we normally expressed J templates using uninflected names. As a
random instance, the Vocabulary entry for dyadic logarithm says:
y = x^.x^y
which, if we slapped a 4 : ' to the left and a ' to the right, becomes an
executable tautology in J6 (i.e. the implied substitution for x and y will
be done by the interpreter).
In a similar vein, I would to propose an extension. Just as:
4144 155 qdoj ':'
The use of m instead of u restricts the
corresponding argument to being a noun, as does the use of n
instead of v .
I suggest adding:
The use of f instead of u restricts the
corresponding argument to being a verb, as does the use of g
instead of v .
This will not add any power to J, except in terms of expressiveness. Just as
we use x instead of x. when we express J templates, so we use f instead
of u . Examples abound:
http://www.jsoftware.com/books/help/release/powop.htm
I suspect f. g. would have been chosen over u. v. in the first place, but
when those names were introduced f. already meant something else. Now that
explicit arguments are uninflected, no conflict arises.
I also suggest removing any remaining ambiguities about the identities of x
and y in explicit operators. They should refer solely to the noun arguments
of the derived verb.
Since we're breaking compatibility WRT explicit arguments anyway, and we're in
beta, now is the time to make these changes.
If this proposal is adopted, I would like to make the parallel proposal of
changing the DoJ such that references to u are replaced with f when a verb
argument is explicitly intended. This will be more consistent and will reduce
ambiguity: the name u can be a noun or a verb, but, e.g., u/ explicitly
means f/ .
BTW : is slightly broken:
+ 1 : 'x.'
+
This should produce spelling error. There are also silly things like 3 : ('
''y.''=.4 ';' ''y.''~ ') which should produce ill-formed name, but those are
not so important.
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm