Re: [RFC] Loop... or...
| From: | Andrea Faulds | Date: | Fri, 19 Sep 2014 22:47:19 +0000 |
| Subject: | Re: [RFC] Loop... or... | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77352@lists.php.net to get a copy of this message | ||
On 19 Sep 2014, at 22:56, Leigh <leight@gmail.com> wrote:
> Loops with a default block, executed in the event that the loop is
> never entered.
>
> https://wiki.php.net/rfc/loop_or
While this might be useful, I’d prefer we copy Python’s else behaviour, where a block of code is
executed when break is never used. This feature makes code that does, for example, a linear search
nicer to read.
--
Andrea Faulds
http://ajf.me/