I fail to see what this discussion about closure has to do with J programming. The faultmay be entirely mine; I am an old man and an amateur programming. If this discussion is about J programming, please inform me of the connection. If not, I suggest that you guys get together and discuss this among yourselves.

On 02/20/2013 09:37 PM, William Tanksley, Jr wrote:
Reading back through this discussion was difficult but enlightening.

Here's how it started:

On Fri, Feb 15, 2013 at 4:40 AM, Boyko Bantchev <[email protected]> wrote:
The 'Lexical Closure' essay
(http://www.jsoftware.com/jwiki/Guides/Lexical%20Closure)
mentioned in this thread declares lexical closures to be
'incompatible with the functional programming model'.
Such a statement is incorrect.
If a function returns different values for the same arguments, it
is not because closures are involved but because that function has
a changeable state.
Specifically, this was mentioned in a wiki edit credited to DanBron.
Dan is largely right, except in the part Boyko is quoting; Boyko is
exactly correct that Dan has allowed "stateful" and "closures" to mix
up his words. In context, Dan's contribution is OK, since he's
actually addressing Graham's challenge which implies the same error.

Raul then claims that Boyko's statement is "not meaningful" because
his usage of the word "function" "conflicts with the usual meaning of
the word".

Raul is incorrect. Boyko was correct to use the word "function" in the
same sense that Dan (and Graham) used it, and in fact he was
considerate enough to explain why he felt the need to disagree with
them. Furthermore, he did not disagree with them because he used a
different definition of the word "function", but rather because they
(collectively) incorrectly claimed that closures would render a
language not functional.

Raul Miller <[email protected]> wrote:
As I understand it, if closures *are* purely functional they would not
allow state change.
I think I would use a different tense (for example, subjunctive tense)
to express that they have the potential of being purely functional.
Here Raul makes a statement that means exactly what Boyko said, which
Raul said was "not meaningful".

I don't see a reason to carry this conversation on. Anyone else?

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


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

Reply via email to