On Fri, May 11, 2012 at 8:33 AM, Alexander Moskaliov <ir...@irker.net> wrote: > I think the main idea of this RFC: Run the code, if we had never entered > in loop. > In this case more sence to change "for .. else" condition to this: > If second expression is equal FALSE before looping(but after run first > expression of course), we run "else" code. > > By example: > for (exp1;exp2;exp3) { > exp4; > } else { > exp5; > }
Python already uses the for .. else syntax, but with different semantics: In Python the else clause is only executed, if the loop isn't left using break. See this article for more info: http://psung.blogspot.de/2007/12/for-else-in-python.html Thus I'm not sure that it really makes sense for us to introduce this syntax with a completely different meaning. Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php