On 03/10/2014 22:33, Leigh wrote:
> Opening the vote on loop + or control structures.
>
> https://wiki.php.net/rfc/loop_or
>
> Voting will close in 1 week and requires a 2/3 in favour to pass.
>
> Remember at this stage the implementation is flexible.
>
Hi,
After talking with other members of AFUP, it seems most of us like the
idea of having some way of executing code if a loop is never executed.
The "or" keyword feels a bit odd to those who are used to the "else" of
Twig (or other languages) -- but it's not really that much of a problem
either: after a while, we'll get used to using "or" (or some other keyword).
So, we would be on the +1 side of things on this.
Still, Sara's idea of giving all loop constructs a return value
indicating the number of times the loop executed feels great -- and this
would probably be more flexible than loop...or
I'm guessing this is why you voted "no" on your own RFC?
--
Pascal MARTIN, AFUP - French UG
http://php-internals.afup.org/