Re: Re: [Zend Engine 2] Re: [PHP-DEV] namespaces ambiguity
| From: | Boian Bonev | Date: | Mon, 01 Oct 2001 05:36:04 +0000 |
| Subject: | Re: Re: [Zend Engine 2] Re: [PHP-DEV] namespaces ambiguity | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-66895@lists.php.net to get a copy of this message | ||
why not => then. imo the parser will easily distinguish array definition
from an expression
b.
----- Original Message -----
From: "Andi Gutmans" <andi@zend.com>
To: "Zeev Suraski" <zeev@zend.com>; "Stig Sæther Bakken"
<ssb@alltheweb.com>
Cc: <php-dev@lists.php.net>; <engine2@lists.zend.com>
Sent: Sunday, September 30, 2001 11:02 PM
Subject: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] namespaces ambiguity
Well the difference is that C++ can figure out what to do at compile-time.
I don't think we can which means that it would put more logic into run-time
which is a bad thing IMO (especially for something new like this).
Or can you think of a way to differ between these at compile-time?
Andi
At 09:56 PM 9/30/2001 +0200, Zeev Suraski wrote:
>:: is taken, but why not do it the C++ way? It also uses :: for both
>classes and namespaces.
>
>Zeev
>
>At 21:35 30-09-01, Stig Sæther Bakken wrote:
>>[Andi Gutmans <andi@zend.com>]
>> > Hey,
>> >
>> > I just started playing around with the parser to support the
>> > namespaces syntax Stig laid out in his RFC. I think I've thought of an
>> > ambiguity (with constants) which makes me wonder how feasible the
>> > proposed syntax is.
>> > Consider the following expression:
>> > $test?FOO:BAR:BARBARA
>> >
>> > Would this mean that the person meant $test?(FOO):(BAR:BARBARA) or
>> > $test?(FOO:BAR):BARBARA?
>>
>>Okay, is there another character we can use? Doesn't look that way.
>>Maybe we need to use two characters then? Since both "::" and "->"
>>are taken, "//" is the best suggestion I can come up with.
>>
>> - Stig
>>
>>--
>> Stig Sæther Bakken <ssb@alltheweb.com>
>> Fast Search & Transfer ASA, Trondheim, Norway
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
For additional commands, e-mail: php-dev-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net