Andi Gutmans <[EMAIL PROTECTED]> wrote: > For some reason this doesn't exist in other languages like C++ and Java. > I don't object to adding this as long as their is no good reason why those > languages didn't support these. > What do other people think?
i think, given that php's || and && operators always return a boolean value, people are going to be confused and disappointed with ||= and &&= when coming from languages (like perl) that implement them as returning false or the value that was true. that is, the perl idiom: $value ||= $some_default_value; wouldn't behave as someone familiar with the perl behavior would expect, just like: $value = $user_value || $some_default_value; doesn't. (that said, i've always been +1 on making the behavior of || and && be like perl does it. it is far more useful than merely returning the boolean value of the expression.) jim -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php