[PHP-DEV] Re: [PATCH] Re: [PHP-DEV] namespace examples (solving name resolution order issues)

2008-09-09 Thread Greg Beaver
Stanislav Malyshev wrote: > Hi! > >> a use statement. For those who aren't clear on what Stas is saying, >> here is the better example: >> >> > namespace PEAR2::Pyrus::PackageFile::v2Iterator; >> use namespace::File, namespace::FileAttribsFilter, >> namespace::FileContents; >> ?> > > No, actually

[PHP-DEV] Re: [PATCH] Re: [PHP-DEV] namespace examples (solving name resolution order issues)

2008-09-09 Thread Stanislav Malyshev
Hi! a use statement. For those who aren't clear on what Stas is saying, here is the better example: No, actually that's not what I meant. You can do this too, but I meant just use namespace::File. There's no law about using :: in the code, really. Just write namespace::File, it's both sho

[PHP-DEV] [PATCH] Re: [PHP-DEV] namespace examples (solving name resolution order issues)

2008-09-08 Thread Greg Beaver
Hi, I've got what I hope is the solution to the problem that erases the performance issue, and a patch to implement it, read on for details. Stanislav Malyshev wrote: >> Currently, in order for this code to be autoload-compatible, we need to >> use all of the classes: >> >> > namespace PEAR2::Pyr

Re: [PHP-DEV] namespace examples (solving name resolution order issues)

2008-09-08 Thread Stanislav Malyshev
Hi! First of all, I'd like to thank Greg for moving discussion to the constructive way, way of code examples and proposed solutions. Currently, in order for this code to be autoload-compatible, we need to use all of the classes: No, you don't. You just need to use namespace::File etc. whe

Re: [PHP-DEV] namespace examples (solving name resolution order issues)

2008-09-08 Thread Chuck Hagenbuch
Quoting Greg Beaver <[EMAIL PROTECTED]>: Part 3: judgment of value Current approach: advantages: 1) internal classes resolve very fast disadvantages: 1) potential unexpected name resolution to internal class when namespaced classname exists New approach: advantages: 1) code runs the same regar

[PHP-DEV] namespace examples (solving name resolution order issues)

2008-09-08 Thread Greg Beaver
Hi, This is a middle-length message with 4 parts. Part 1: on-list behavior Could we all please be more efficient? I don't care whether we get along, but we do need to solve a problem, and endless rhetorical flourishes != patches. Part 2: namespace examples. Let's examine a realistic code samp