Marcus Boerger schrieb:
> Hello Oliver,
> 
>   it doesn't matter to the compiler whether it is nonsense or not.
> The only thing that matters is whether i can write a correct
> lexer/parser for this without breaking stuff. Guys if we were requiring
> space around the ternary or anything else we don't do right now then
> the damage is much much worse than with class Date.

If I read Jessie correctly, the parser will throw an error now if the
usage is unclear with the ternary (a:b:c:d). So the real problem is when
namespace constants are not used but the parser thinks that he's reading
some:

$a = ($b)? c:d;

Are c and d constants or is this the constant d in the namespace c?
More problems arise if the thrid argument is made optional (wasn't this
raised with the ifsetor issue?). OK, I get the problem.

Jessie, what are you parsing from the thing up there? Will you eat this
as class constant or will this correctly be read as "constant a, else
constant b"?

Then again: I don't need namespace constants, but what about the
existing defined constants in globals namespace? Will they stay global
until they're all put into classes?

OLLi

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to