Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-10-01 Thread Derick Rethans
On Fri, 19 Sep 2008, Greg Beaver wrote: Hi all, There is a problem in the namespace implementation. This code demonstrates the issue: code.inc: ?php namespace foo; class test { const my = 1; static function bar(){} } namespace foo::test; const my = 2; function bar(){} ?

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-10-01 Thread Jochem Maas
Derick Rethans schreef: On Fri, 19 Sep 2008, Greg Beaver wrote: Hi all, There is a problem in the namespace implementation. This code demonstrates the issue: code.inc: ?php namespace foo; class test { const my = 1; static function bar(){} } namespace foo::test; const my = 2;

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-22 Thread Janusz Lewandowski
Having conflicting names of namespaces and classes is a idea bad from the ground, and it should not be allowed. PHP should trigger a fatal error when it sees it. Having two things with the same name is unnatural and unneeded. Syntax with - is unnatural and unreadable. - is for working with

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-21 Thread Lupus Michaelis
Larry Garfield a écrit : I agree that #5 seems like the best solution. The problem is caused by the double meaning of ::. All of the other solutions feel like bandaids. They are not a double meaning : it is a scope resolver. Like in C++. So please all stop this war about namespaces,

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-21 Thread Jochem Maas
Steph Fox schreef: Hi Jochem, It seems to hav escaped everyone that Greg's latest proposal doesn't change the namespace seperator token, instead it comes with a new concept of namespace member [token]. No, that didn't escape me at all. oh, good! I was responding to the OP. To be

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Etienne Kneuss
Hello, On Sat, Sep 20, 2008 at 5:59 AM, Greg Beaver [EMAIL PROTECTED] wrote: Hi all, There is a problem in the namespace implementation. This code demonstrates the issue: code.inc: ?php namespace foo; class test { const my = 1; static function bar(){} } namespace foo::test; const

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Richard Quadling
2008/9/20 Etienne Kneuss [EMAIL PROTECTED]: Hello, On Sat, Sep 20, 2008 at 5:59 AM, Greg Beaver [EMAIL PROTECTED] wrote: Hi all, There is a problem in the namespace implementation. This code demonstrates the issue: code.inc: ?php namespace foo; class test { const my = 1; static

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Steph Fox
Seems like a winner. Just a whole ton of BC though for those using # for comments. Yep, so forget it. Or were you doing a Jani? ;) - Steph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Diego Feitosa
I can't see how this can break existing code... '#' is usually used at the beginning of a line or after ';' ?php # comment $foo = bar; # comment $_this-will-not-be-evaluated() ? Regards, On Sat, Sep 20, 2008 at 8:57 PM, Steph Fox [EMAIL PROTECTED] wrote: Seems like a winner. Just a whole ton

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Jochem Maas
Steph Fox schreef: Seems like a winner. Just a whole ton of BC though for those using # for comments. Yep, so forget it. Or were you doing a Jani? ;) It seems to hav escaped everyone that Greg's latest proposal doesn't change the namespace seperator token, instead it comes with a new concept

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Steph Fox
Hi Jochem, It seems to hav escaped everyone that Greg's latest proposal doesn't change the namespace seperator token, instead it comes with a new concept of namespace member [token]. No, that didn't escape me at all. I was responding to the OP. To be clear, I have worked with Greg. The

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Larry Garfield
On Saturday 20 September 2008 6:43:41 pm Richard Quadling wrote: 5) a simply syntax change to namespaces, introducing a new concept: namespace element. A namespace element is a class, function or constant defined within a namespace declaration: ?php namespace foo; class bar {}

Re: [PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-20 Thread Gregory Beaver
Larry Garfield wrote: On Saturday 20 September 2008 6:43:41 pm Richard Quadling wrote: 5) a simply syntax change to namespaces, introducing a new concept: namespace element. A namespace element is a class, function or constant defined within a namespace declaration: ?php namespace foo;

[PHP-DEV] solving the namespace conflict issues between function/static method class constant/ns constant

2008-09-19 Thread Greg Beaver
Hi all, There is a problem in the namespace implementation. This code demonstrates the issue: code.inc: ?php namespace foo; class test { const my = 1; static function bar(){} } namespace foo::test; const my = 2; function bar(){} ? main.php: ?php include 'code.inc'; foo::test::bar(); //