Replies: 1 comment
-
|
I don't see any objection |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This would be backward compatible since no existing user code can contain
R.(or whatever new adverb spelling/inflection is chosen), as it would've been a spelling error.The following provides a motivation:
ap =: {{y`:6>x}}`{{y`:6&>/x}}@.(2=#@[) r =: ($: 2&}.)`(ap 1&{)@.(ap {.)`ap@.(1=#@]) Cond=: {{< :(,&<) r m"_}}Here the recursive subexpression
ris defined on its own line just because we don't want the< :(,&<)part ofCondto be part of the recursion; butris not a very natural expression to separate fromCondand assign to a name.Ideally this would be written inline using a recursion scoping adverb
R.:ap =: {{y`:6>x}}`{{y`:6&>/x}}@.(2=#@[) Cond=: {{< :(,&<) ($: 2&}.)`(ap 1&{)@.(ap {.)`ap@.(1=#@])R. m"_}}where the scope of
$:is limited to [the verb operand to the nearest adverbR.] which contains$:. The existing definition of$:holds if its noR.is present within the largest verb containing$:within the given sentence.R.can appear in multiple places within a verb, as inAs motivation, one of the benefits of J's terseness, and of tacit programming's absence of names, is the dispensation of the need to break up code into arbitrary (non-[conceptual/semantic]) pieces which will be used once only, and of the resulting need to create arbitrary names for these pieces. Anonymous recursion seems to be the only place where one is forced into doing so.
Z.would be my fallback naming suggestion since this adverb is likeZ:in that each modifies the behavior of a particular primitive ($:andF(.:)(.:)respectively).Beta Was this translation helpful? Give feedback.
All reactions