Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity
| From: | Dean Hall | Date: | Mon, 01 Oct 2001 03:20:46 +0000 |
| Subject: | Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-66893@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "George Schlossnagle" <george@mail.communityconnect.com>
To: "Dean Hall" <hall@apt7.com>
Cc: "Rasmus Lerdorf" <rasmus@php.net>; <php-dev@lists.php.net>;
<engine2@lists.zend.com>; "Andi Gutmans" <andi@zend.com>
Sent: Sunday, September 30, 2001 09.44pm
Subject: Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces
ambiguity
> The point is that while those are both valid
>
> $test?FOO:BAR:BARBARA
>
> is ambiguous in that it could refer to either of those.
I guess my point is that I see no problem with a parse error message here
when it is ambiguous. To make it unambiguous, you would just use
curly-braces like this:
$test?FOO:{BAR:BARBARA}
(This seems like it would need some additional functionality in the parsing
engine to extend the curly-brace mechanism outside of
double-quotes/heredocs -- and to constants, not just variables.)
Also, I think that namespaces should allow no spaces between namespace names
and other namespace names or variable/class/constant names. e.g.:
FOO : BAR : BARBARA
is illegal as a fully-qualified constant name, so the following would
eliminate ambiguity as well:
$test ? FOO : BAR:BARBARA;
Dean.