Re: [PHP-DEV] multiple namespace per file patch

2007-12-04 Thread Sam Barrow
I support this patch 100%. I have a large application I'm rewriting to include namespaces, however now I can no longer use my script caching functionality (which improved performance literally about 500%) that compiled all of my includes into one file, because many of the files have namespaces. On

Re: [PHP-DEV] multiple namespace per file

2007-09-20 Thread Stanislav Malyshev
Does closing php tags end the namespace declaration? ie would the following work: php tags would not influence namespace declarations, i.e. it would continue as if there were just PHP code. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829

Re: [PHP-DEV] multiple namespace per file

2007-09-20 Thread Marc Gear
On 9/11/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > if the > file has namespaces, then it can have no code outside namespaces. This seems like a great compromise, FWIW +1 here. Does closing php tags end the namespace declaration? ie would the following work: namespace foo; class a { pub

Re: [PHP-DEV] multiple namespace per file

2007-09-11 Thread David Coallier
On 9/11/07, Larry Garfield <[EMAIL PROTECTED]> wrote: > On Tuesday 11 September 2007, Marcus Boerger wrote: > > Hello Stanislav, > > > > Tuesday, September 11, 2007, 1:21:07 AM, you wrote: > > > Hi! > > > > > > Following the feedback from the community, we (mostly me and Dmitry) > > > tried to find

Re: [PHP-DEV] multiple namespace per file

2007-09-11 Thread Larry Garfield
On Tuesday 11 September 2007, Marcus Boerger wrote: > Hello Stanislav, > > Tuesday, September 11, 2007, 1:21:07 AM, you wrote: > > Hi! > > > > Following the feedback from the community, we (mostly me and Dmitry) > > tried to find a good model that would allow multiple namespaces per file > > withou

RE: [PHP-DEV] multiple namespace per file

2007-09-11 Thread Dmitry Stogov
> And even if we do > multiple namespaces per file. I guess we do not allow a > namespace to be spread onto several files, right? Current implementation allows to spread one namespace on several files. You should just use "namespace" with the same name on top of each file. (Very similar to Java)

Re: [PHP-DEV] multiple namespace per file

2007-09-11 Thread Lukas Kahwe Smith
Stanislav Malyshev wrote: So, for the people that wanted multiple NS per file, would such solution work? I think the limitation is acceptable. P.S. this is *not* a "should we use braces" thread, so please don't :) The syntax is not, but since you disallow discussing this in this thread, I

Re: [PHP-DEV] multiple namespace per file

2007-09-11 Thread Marcus Boerger
Hello Stanislav, Tuesday, September 11, 2007, 1:21:07 AM, you wrote: > Hi! > Following the feedback from the community, we (mostly me and Dmitry) > tried to find a good model that would allow multiple namespaces per file > without running into too many problems and complications, and would >

Re: [PHP-DEV] multiple namespace per file

2007-09-10 Thread Stanislav Malyshev
is somefile.php also included in the B namespace since you cannot include it in global scope. No, somefile.php does not automatically belong to either A or B, it can contain namespaces definition inside and thus belong to either A or B or neither, but it is parsed as entirely separate entity

Re: [PHP-DEV] multiple namespace per file

2007-09-10 Thread David Coallier
On 9/10/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > Ok, I was wondering to myself, do you guys think it would be possible > > to do something like having an endnamespaces; keyword that would put > > an end to the namespace definition? > > Oh no :) It doesn't look good and it doesn't solve

Re: [PHP-DEV] multiple namespace per file

2007-09-10 Thread Stanislav Malyshev
Ok, I was wondering to myself, do you guys think it would be possible to do something like having an endnamespaces; keyword that would put an end to the namespace definition? Oh no :) It doesn't look good and it doesn't solve the problem. Hint: the braces have the same problem (that's why I ask

Re: [PHP-DEV] multiple namespace per file

2007-09-10 Thread David Coallier
On 9/10/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > Hi! > > Following the feedback from the community, we (mostly me and Dmitry) > tried to find a good model that would allow multiple namespaces per file > without running into too many problems and complications, and would > allow to bundle