Re: bug when using foreach with references?

From: Date: Mon, 16 Nov 2009 13:10:33 +0000
Subject: Re: bug when using foreach with references?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-46056@lists.php.net to get a copy of this message
Pierre Joye a écrit :
On Mon, Nov 16, 2009 at 12:07 PM, Mathieu Suen <mathieu.suen@easyflirt.com> wrote:
• Pensez à l'environnement, n'imprimez cet e-mail qu'en cas de réelle nécessité
Discussing endlessly an issue only because you do not understand it is also an environmental problem, please consider to read the manual and stop to use every single channel to ask the same questions again and again. Salutations,
That's not a question, look at what lisp dose and scheme. Look at the lambda calculus etc. The variable inside the foreach should not be captured outside. Like function argument. And again and again you are doing the same mistake: "Dynamic scoping is primarily interesting as a historical mistake: it was in the earliest versions of Lisp, and persisted for well over a decade. Scheme was created as an experimental language in part to experiment with static scope. This was such a good idea that eventually, even Common Lisp adopted static scope. Most modern languages are statically scoped, but sometimes they make the mistake of recapitulating this phylogeny. So-called “scripting” languages, in particular, often make the mistake of implementing dynamic scope (or the lesser mistake of just failing to create closures), and must go through multiple iterations before they eventually implement static scope correctly." - Shriram Krishnamurthi, "Programming Languages: Application and Interpretation" section 6.5: -- Mathieu Suen

« previous php.internals (#46056) next »