Re: solving the namespace conflict issues betweenfunction/staticmethod class constant/ns constant
| From: | Richard Quadling | Date: | Mon, 29 Sep 2008 12:47:45 +0000 |
| Subject: | Re: solving the namespace conflict issues betweenfunction/staticmethod class constant/ns constant | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-40768@lists.php.net to get a copy of this message | ||
2008/9/29 Arvids Godjuks <arvids.godjuks@gmail.com>:
> String concatenation woun't be affected, because you can't concatenate class
> definitions like in my example.
> To concatenate you should use variables or strings/numbers. So I don't see
> any complications with that.
>
> 2008/9/29 Stan Vassilev | FM <sv_forums@fmethod.com>
>
>>
>> Hi,
>>
>> I think we need string concatenation here and there ;)
>>
>> Regards,
>> Stan Vassilev
>> ----- Original Message -----
>> From: Arvids Godjuks
>> To: Stan Vassilev | FM
>> Cc: PHP Internals List
>> Sent: Monday, September 29, 2008 9:19 AM
>> Subject: Re: [PHP-DEV] solving the namespace conflict issues
>> betweenfunction/staticmethod class constant/ns constant
>>
>>
>> Maybe just use . as namespace separator.
>>
>> MyNameSpace.SomeClass::_getInstance()->SomeDBClass->Query();
>>
>> That will eliminate all resolution problems, it isn't used for anything
>> than string concatenation, and it's one symbol. It's 100% better than \ and
>> I think it would be better than ::: or :::: and so on.
>> A point against \ is that it has special meaning in every programming
>> language as escape character, so it is 100% bad to use it.
>>
>
What would happen to a class with a toString() method?
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"