Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77353 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45242 invoked from network); 19 Sep 2014 23:10:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2014 23:10:53 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:40997] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/05-13213-AF7BC145 for ; Fri, 19 Sep 2014 19:10:50 -0400 Received: by mail-wi0-f173.google.com with SMTP id r20so315538wiv.6 for ; Fri, 19 Sep 2014 16:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=b8abOKswuQu76KUbQrw/AVAjLpP0QAFVa/AkCCWlgoU=; b=DbgZHzX5o+/l7LgJ1Nv3SFUDYsrmxn6TvQKrL0sqo5OMHPC+kOXVY2ZX+Kcs80Jhds V7RCvEVc8Q+RFYDSTavZyrIPweLbl5IzAeNLbr6wsk4nhpr+L6Yz8227IAWPhr4ndHEW eX9EAOG8/cH/2CySlFhcPCQJwc4f+MClnFE9/Ls8GVB6JODgKhbXQQmqXAnKbr79BWR7 Ihhtq9pBYP3b8HFBSCmpHeqHbchH7EKqdPZPWmWoL8YBYaRlmlQ3L3TJ/VErzfhHbQNV EYKQS9mlLPevzvi6d7EPcHieDwF9ffltXYoyKaastWBQHbZrZGAmp2PFzy2Tn48jSBnU TzcQ== MIME-Version: 1.0 X-Received: by 10.180.86.73 with SMTP id n9mr1006544wiz.30.1411168247093; Fri, 19 Sep 2014 16:10:47 -0700 (PDT) Received: by 10.217.55.195 with HTTP; Fri, 19 Sep 2014 16:10:46 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Sep 2014 00:10:46 +0100 Message-ID: To: Andrea Faulds Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Loop... or... From: leight@gmail.com (Leigh) On 19 September 2014 23:47, Andrea Faulds wrote: > > While this might be useful, I=E2=80=99d prefer we copy Python=E2=80=99s e= lse 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 re= ad. > > -- > 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.