Re: Reference and First-Class Function
Dimitre Novatchev <[email protected]> Sat, 20 Dec 2008 11:59:57 -0800 (PST)
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
> > Once again, closures "have references" to external variables.
> =
> > As I said even in my previous message, a closure contains a
> > reference.
> =
> =A0 Or put in another way: if you get closures, you get references.
This statement ignores the fact that the term "reference" is used in the de=
finition of "closure" I quoted the definition of closure from Wikipedia and=
the places where the term "reference" is used.
> =
> > A closure relies on the concept of reference being already
> > implemented.
> =
> =A0 I wouldn't put it like that.=A0 Closures does not rely on the feature
> of reference being available in the language, even if their
> implementation needs to provide that in some way.
A very interesting statement... :)=A0 So, we confess of having to use refer=
ences=A0 ...=A0 from somewhere...???
Then we deny references existed when we used them...
Then we say: We give you references *for free* !
This made my day, Thank you.
> =
> =A0 And as Michael showed us, if you get closures, you get references for
> free.
Of course -- as you already have *references* inside the closure!
Dr. Kay did't show anything. He expressed his believes on the topic.
On the other side, I provided quotes to the definition of closure. This is =
not my belief, but the oficial definition.
The=A0definition of closure=A0uses references, so it is not what Dr. Kay is=
speaking about.
Therefore, it would be correct if Dr. Kay stops calling "closure" the thing=
he is talking about, rename it to something else, and most importantly, sh=
ow how this "something else" can create a reference out of thin air.
Cheers,
Dimitre
=