On Mon, 2007-03-19 at 17:53 -0400, Sean Coates wrote:
> > I'm not arguing the preservation of the exact value of $rev when the
> > anonymous function was created (as would be the case with a closure).
> > I'm thinking of the variable being whatever is defined in the parent
> > regardless. As in my proposal, the seek could search all the way up to
> > the top in which case the $rev would be found if it had been defined as
> > expected. At any rate, I guess this is diverging from the real
> > discussion of anonymous functions :)
> 
> If you've ever tried to hack on the source to anything that you didn't
> write that also uses globals throughout (Gallery2, for example), you
> know how hard it is to track down a single layer of scope that can be
> defined [somewhere else].
> 
> Tracking this up the chain like a bubbled exception sounds like a
> nightmare for debugging/comprehension, and IMO it's too magical.
> 
> One layer of scope might be useful: $_PARENT ?
> More than that, and my head starts to hurt.

Well I did originally suggest defaulting to the parent scope with
options for advanced users to climb higher :) Just because there are
unwashed masses as Richard Lynch likes to call it, doesn't mean we all
need to suffer their limitations.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to