In my opinion this is consistent with the fact that PHP has no
block-scoped variables. The situation is similar with the one in JavaScript.
In JavaScript the problem has been solved by Mozilla with so-called let
definitions[1], which are block-scoped.
1:
https://developer.mozilla.org/en/New_
Etienne Kneuss wrote:
Hello,
On Mon, Mar 1, 2010 at 1:33 PM, mathieu.suen wrote:
Hi,
I am proposing a comparison between PHP closure with lisp one.
First thing to compare is how scope are capture:
Suppose I want to create a function that add.
The common idiom to do it in lisp is:
(defun
Hello,
On Mon, Mar 1, 2010 at 1:33 PM, mathieu.suen wrote:
> Hi,
>
> I am proposing a comparison between PHP closure with lisp one.
>
> First thing to compare is how scope are capture:
> Suppose I want to create a function that add.
> The common idiom to do it in lisp is:
>
> (defun adder (x) #'(