Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77388 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33863 invoked from network); 20 Sep 2014 16:45:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2014 16:45:05 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.179 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.179 mail-we0-f179.google.com Received: from [74.125.82.179] ([74.125.82.179:38748] helo=mail-we0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/B6-24334-01FAD145 for ; Sat, 20 Sep 2014 12:45:04 -0400 Received: by mail-we0-f179.google.com with SMTP id u56so1052874wes.10 for ; Sat, 20 Sep 2014 09:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to:cc :message-id; bh=3y/rEdphlpFET3f9cc3P+j23Ewt/yaL2p23PhFmSAEo=; b=MCiUvAuI65mELbvdZDiyJDdmUAuuFCUOMVwoltpmepf0d0dz6cxOkbANDX8jzm5fXk i+qzXpIH9BUbO1vONQLRLBR6jbM35lypZEF2HK1z4CJAmdeVDRq2bwNs77TU8CdhcHgc sekKj8YSgJ90MwcqafIrjMFKU59wuRVABSsUwkCs03PXWVPlVQatqbT1UqtDn0QheR+F r5EDilOp5QVCu2KUlOPT08lYiToDJcdiqkY5PEeZ3tiS8Pp6zjAafxmjT+Ldt0h2MT5w Plthfe15I6afntFZRmfmB7IFLpKWtDd8BbbAUZXU1rBdVqjhQYvIqrlEVy7n5HxFMWoA RBVw== X-Received: by 10.194.206.103 with SMTP id ln7mr8880963wjc.30.1411231500907; Sat, 20 Sep 2014 09:45:00 -0700 (PDT) Received: from [10.148.41.204] ([213.205.240.101]) by mx.google.com with ESMTPSA id fl6sm5893133wib.21.2014.09.20.09.44.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 20 Sep 2014 09:45:00 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: References: <541CC433.7050205@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Sat, 20 Sep 2014 17:44:53 +0100 To: Leigh CC: internals@lists.php.net Message-ID: <3655a635-b062-42c2-9060-0f6b76d24650@email.android.com> Subject: Re: [PHP-DEV] [RFC] Loop... or... From: rowan.collins@gmail.com (Rowan Collins) On 20 September 2014 15:43:46 GMT+01:00, Leigh wrote: >On 20 September 2014 01:02, Rowan Collins >wrote: >> >> It seems like there are actually quite a number of special blocks you >> *could* define > >Some or all of these can be implemented (in other RFCs). > >However in order to avoid specifying every permutation in the grammar >it would require converting loop structures that currently have a >defined number of children, into list structures ("if" behaves like >this, with multiple optional "elseifs" and an optional "else"). Yeah, I absolutely didn't mean that all of these were equally essential, I was just brainstorming some of the possible permutations. I guess the only way to avoid running out of keywords would be to have a generic clause like "on(x)", but that's probably just asking for trouble... foreach ( $x as $y ) { ... } on ( break ) { ... } on ( nobreak ) { ... } on ( continue ) { ... } on ( nocontinue ) { ... } on ( noloop ) { ... } on ( loopcount == 1 ) { ... } Yeah, let's not do that! :p -- Rowan Collins [IMSoP]