Stan Vassilev | FM wrote:
> 
> Hi,
> 
> There is a way to implement in some future release of PHP (without
> hurting performance), but it's not in the scope of 5.3.
> 
> Each namespace should have a meta file listing all symbols present in
> it. The parser loads that static file at parse time and resolves all
> naming at parse time, leaving autoload to figure out only where a symbol
> is, not whether it's present.
> 
> I've not noticed great interest in this approach last time I offered it.

Hi Stan,

The reason there is little to no enthusiasm about this idea is that it
would make developing less robust while giving the illusion of ease.

let's say you have this line of code:

$a = new Blah();

Currently, the class name is deterministic.  It's either (1)
namespace\Blah() or (2) whatever we "use nsname\Blah"ed.

With your proposal, one would have to check every single one of the
meta-files for every class "use"d.  This would mean code review becomes
impossible.

Is it really worth saving a few type-one-time-and-forget-about-it "use"
statements for this terrible risk?

I think not.

Greg

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

Reply via email to