Re: my last attempt at sanity with namespaces
| From: | Janusz Lewandowski | Date: | Wed, 15 Oct 2008 22:59:56 +0000 |
| Subject: | Re: my last attempt at sanity with namespaces | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41103@lists.php.net to get a copy of this message | ||
Hi,
Conflict between namespaced functions and static class methods:
I think that #4 solution is the best one. If it will be accepted, it would be
possible to extend namespaces in PHP6. For example, it would be possible to
allow mixing namespaces and classes with same names, and disallow only mixing
namespaced functions / static class methods. PHP 5.3 is too nearly for such a
change, but in PHP6 you can make static class methods the same thing as
functions and namespaced functions, with one additional feature for them (and
maybe namespaced functions) - support for self::, static:: and parent::. This
way, it will be also possible to add support for having both dynamic method
and static method with the same name, but e.g. other parameters (like
String::substring($string, 4, 2) and $string->substring(4, 2)).
Resolving access to internal classes:
I like your solution, it's much better than current resolution rules.
Janusz Lewandowski