On Tue, Oct 28, 2008 at 8:09 PM, Mark Rickerby <[EMAIL PROTECTED]> wrote:
> They should change the grammar to accept a single : outside the scope
> of a ternary operator, and use this as the namespace separator
> instead.

>From what I've read, a single colon won't work because the colon is
overloaded too much already. Not only is it part of the ternary
operator, it's used in the alternative block syntax and it's soon to
be used in the limited goto construct. Consider this code, that makes
use of the alternative block syntax:

if a:b:c();
endif;

Is that functionally equivalent to:

if (a:b) { // namespace a, constant named b
 c();
}

or to:

if (a:b:c()) {} // namespace a:b, function named c

I could be wrong, but it looks like it's ambiguous.


Dom

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to