Sascha Schumann wrote:
    This rule would favor the "a ? : b" notation - which has
    been supported by GCC for at least five years.

My personal reasons against ?: : - It's non-standard and not well known even though GCC supports it. - It's hard to look up. - It's easily confused with $a ? $b : $c; - It's ugly (-:C

I'd even prefer the Perl 6 err operator over it which is '//' or 'err' (low precedence) but then // is already the C++-style comment which I wish we hadn't introduced to PHP to start with :-)

But unless convinced otherwise I think a pseudo-function like coalesce() is the way to go.

- Chris

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



Reply via email to