Re: [RFC] Loop... or...

From: Date: Fri, 19 Sep 2014 23:10:46 +0000
Subject: Re: [RFC] Loop... or...
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-77353@lists.php.net to get a copy of this message
On 19 September 2014 23:47, Andrea Faulds <ajf@ajf.me> wrote: > > 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/ > Hey Andrea, The RFC describes in particular why the else keyword is a bad choice, and opens up the possibility of Python-style "else" in a future RFC. Please consider this feature request as independent of any python-related functionality. I understand the desire for something python-like, however it certainly doesn't fall under the "or" keyword. If anything we could probably get away with it under "and", or introduce a new keyword of "then", but really, that is a subject for a different thread altogether. This thread is about the "loop not entered" syntax. Lets stick to that for now, and I'm more than happy to create a thread for the other scenario later on, and we can discuss the python style there instead. Cheers, Leigh.

« previous php.internals (#77353) next »