Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77408 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97700 invoked from network); 21 Sep 2014 06:45:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Sep 2014 06:45:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@bof.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@bof.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bof.de designates 80.242.145.70 as permitted sender) X-PHP-List-Original-Sender: php@bof.de X-Host-Fingerprint: 80.242.145.70 mars.intermailgate.com Received: from [80.242.145.70] ([80.242.145.70:55396] helo=mars.intermailgate.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/A6-55126-EF37E145 for ; Sun, 21 Sep 2014 02:45:21 -0400 Received: (qmail 11985 invoked by uid 1009); 21 Sep 2014 08:45:15 +0200 Received: from 209.85.192.54 by mars (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.96.2/19410. spamassassin: 3.3.1. perlscan: 1.25-st-qms. Clear:RC:1(209.85.192.54):. Processed in 0.105346 secs); 21 Sep 2014 06:45:15 -0000 X-Antivirus-MYDOMAIN-Mail-From: php@bof.de via mars X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(209.85.192.54):. Processed in 0.105346 secs Process 11971) Received: from mail-qg0-f54.google.com (gmail@bof.de@209.85.192.54) by mars.intermailgate.com with RC4-SHA encrypted SMTP; 21 Sep 2014 08:45:15 +0200 Received: by mail-qg0-f54.google.com with SMTP id a108so1587356qge.41 for ; Sat, 20 Sep 2014 23:45:13 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.224.66.7 with SMTP id l7mr12356281qai.46.1411281913760; Sat, 20 Sep 2014 23:45:13 -0700 (PDT) Received: by 10.140.86.112 with HTTP; Sat, 20 Sep 2014 23:45:13 -0700 (PDT) Received: by 10.140.86.112 with HTTP; Sat, 20 Sep 2014 23:45:13 -0700 (PDT) In-Reply-To: References: <1A5B2D07-FEC6-410E-85C9-3FBE2F105104@golemon.com> Date: Sun, 21 Sep 2014 08:45:13 +0200 Message-ID: To: Sara Golemon Cc: internals , Leigh Content-Type: multipart/alternative; boundary=001a11c22b0225d79e05038dadcd Subject: Re: [PHP-DEV] [RFC] Loop... or... From: php@bof.de (Patrick Schaaf) --001a11c22b0225d79e05038dadcd Content-Type: text/plain; charset=UTF-8 Am 21.09.2014 02:22 schrieb "Sara Golemon" : > > > It would also mean having to make { default block } into an > > expression... with a return value (to be allowed on either side of the > > boolean or) > > > Excellent point, a block only works with T_OR if it has a value. I'm > pretty sure that at this point, it doesn't. That does put a monkey > wrench into it. Perhaps a lambda could accommodate that? Starts to > get ugly though... This strongly reminds me of statement expressions in GCC. Any block used in an expression context, would evaluate to the last expression result executed computed within the block. Any code using such constructs, quickly becomes a totally unreadable mess. GCC gets away with that because the whole thing, as far as I remember and have seen in practise, is meant to be used within CPP macros, i.e. hidden at the call sites. And PHP lacking a CPP macro concept, that excuse is not present for us. So,, to complete this great idea, we need to add a CPP macro like facility, too :) best regards Patrick --001a11c22b0225d79e05038dadcd--