[Jprogramming] Rosetta Codes: Amb operator
Tracy Harms
kaleidic at gmail.com
Fri Nov 28 03:47:50 HKT 2008
Raul,
I agree that function is too narrowly defined in that page. I also
think there is no need to take Graham's use of the word "function" as
though the typical J meaning was intended; it was not. I also agree
that J operators are properly called functions. (They should be called
higher-order functions when necessary to prevent confusion,
obviously.)
Still, I think Dan's basic point stands: closures require more than a
mathematical function provides. They require a runtime context, and
thus are stateful. I'm ready to abandon my claim that J does not
support/involve/do lexical closures, but I'd like to have such a
retraction come with a clear understanding of how these are
accomplished in J.
Would it be adequate to say this? In J there is no language-supported
distinction between objects and lexical closures; both are alike in
combining functions and data such that results depend not only on the
parameters provided, but also the ("internal") state of the thing that
is called on.
Some J primaries have this property, e.g. ? and ?.
--
Tracy
More information about the Programming
mailing list