2008/9/29 jvlad <[EMAIL PROTECTED]> > > > > So as prevoius speaker suggested, and I personaly got to conclusion > in > > > > other thread that ":" is ideal. Short, isn't taken. > > > > > > $a = $b?A:B:C:D; > > > > Will _you_ write such code? No. Will anybody from this list write such > > code? > > You may want to write > $a = $b?A:B:C > and how would php compiler resolve A:B:C? > A:B vs C > or A vs B:C? > > To me it's better to stay with :: > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > We have (), so just do
$a = $b ? (A:B:C:D) : blah(); Document, that namespaced calls should be in () with ternary operator and make it a parse error if coder forgets it. That's a good compromise and little to pay for namespaces, and doesn't break any BC. I think using ternary operator in such cases isn't realy wise - if () { } else {} is far more appropriate (anyway, I'l beat my coders for such usage of ternary operator). So as other members of this thread mentioned - would you really write code like this: $a = $b?A:B:C:D; Are you? Me 100% not.