Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88031 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97433 invoked from network); 3 Sep 2015 10:52:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2015 10:52:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=bjorn.x.larsson@telia.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=bjorn.x.larsson@telia.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain telia.com from 81.236.60.154 cause and error) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.154 v-smtpout1.han.skanova.net Received: from [81.236.60.154] ([81.236.60.154:60778] helo=v-smtpout1.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/C7-53181-05628E55 for ; Thu, 03 Sep 2015 06:52:01 -0400 Received: from [192.168.7.6] ([195.198.188.252]) by cmsmtp with SMTP id XS7YZWoih9HQVXS7ZZGEJk; Thu, 03 Sep 2015 12:51:57 +0200 To: Rowan Collins References: <55E77CA9.7050609@gmail.com> <55E81959.6040305@gmail.com> Cc: PHP Internals Message-ID: <55E8264D.6060609@telia.com> Date: Thu, 3 Sep 2015 12:51:57 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55E81959.6040305@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfI2XjLV0EnSj+BiLgPeHlOSzF2RPO1iW3GbOxoCSO1LW0RL/HIBSiUsWjD3dugbDGueqOkKvLZ9kD4WBsh4O9657oIC4vTvapiCkXrX+QogMdAcIcnQblc+SFM3E4Ve6cHrnEiHWf3xpzj5p2fk/4njzt+P0XIECrb1xC2gDoJrmhLStRNPz9QQ6XT4gvhLB67UhNU84Xt9HzBvfrBf2aPfejj+hkolSw4lNLHc4XlWN Subject: Re: [PHP-DEV] [RFC] [Discussion] Short Closures From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2015-09-03 kl. 11:56, skrev Rowan Collins: > Pavel Kouřil wrote on 03/09/2015 07:32: >> Amendment 2. Make the ~> operator non-associative > >> Why? Once you read documentation about how the operator works and what >> it does, you will know it and writing the extra brackets seems >> superfluos. And woudn't this complicate the parser even more? Also, if >> you have no idea about functional programming whatsoever, this will be >> hard to grasp in any syntax form, but the syntax isn't the problem in >> that case (as I already said in previous email). > > Yeah, maybe this one is just me - I just find right-associativity > really hard to read, whatever it's purpose. Maybe it's because I've > only ever read left-to-right languages. > > As mentioned in a previous e-mail, when I look at "$a ~> $b ~> $c" it > makes me think of a single chain where all the terms are somehow > related, like "$a = $b = $c", rather than any kind of nesting. Maybe > I'd get used to it, maybe it would be rare enough that I'd never need to. > > >> So you are taking a syntax that's supposed to be short and "clean" and >> making it more complex by the amedments 3 and 4? > > No, I'm trying to think of compromises which address constructive > criticisms people have made of the current proposal, such as the > variety of syntax forms, and the implicit scoping of variables. > > To be clear, these are not demands or anything like that, just > suggestions of how to move the discussion beyond "here's the proposal, > take it or leave it". Really appreciate that! Like the idea but the variation in syntax forms is a bit confusing. Maybe one start with a very simple function and as as you expand it the syntax form needs to change which I think is a drawback. Regards , //Björn Larsson