Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98079 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99665 invoked from network); 31 Jan 2017 13:03:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2017 13:03:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.160 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.160 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.160] ([81.169.146.160:20191] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 46/C5-51557-73B80985 for ; Tue, 31 Jan 2017 08:03:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1485867828; l=2527; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=+w41zYmaaFl0HtHn/9iX5mgE3+036LAVF2JRqyqD0sM=; b=AUbGQC0BKcxR3c5T6UMs9Uj4f2+Fa+CKLUXKJe37qLK91etdCo5eTaDxzJ1fMADRUN THdW4B3RCXSD6okrDA+aLoqdiHpnf+54XzJaHT60zzQz5JWIHRKAnFINwrNO6A+vzAm4 nE4OLpDVDMUTQl9oJqQlRWLl0X6vgHLrEfDAU= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoBPBqD/tJ8= X-RZG-CLASS-ID: mo00 Received: from mail-qk0-f174.google.com ([209.85.220.174]) by smtp.strato.de (RZmta 39.12 AUTH) with ESMTPSA id L0a413t0VD3mC3r (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Tue, 31 Jan 2017 14:03:48 +0100 (CET) Received: by mail-qk0-f174.google.com with SMTP id s140so162950102qke.0 for ; Tue, 31 Jan 2017 05:03:48 -0800 (PST) X-Gm-Message-State: AIkVDXI+k7YqhW2F9D8UlzJ2lW3hqpqay+KtffSG/XiwcTHoKjl60GfpS5+zLiPJXeY14pdGYR+WK+1/35pHRg== X-Received: by 10.55.80.214 with SMTP id e205mr14029938qkb.60.1485867827853; Tue, 31 Jan 2017 05:03:47 -0800 (PST) MIME-Version: 1.0 References: <20170131122056.GA14569@phcomp.co.uk> In-Reply-To: Date: Tue, 31 Jan 2017 13:03:37 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Nicolas Grekas Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a114a7f8a103c0305476390fd Subject: Re: [PHP-DEV] [RFC][Discuss] Arrow Functions From: me@kelunik.com (Niklas Keller) --001a114a7f8a103c0305476390fd Content-Type: text/plain; charset=UTF-8 Nicolas Grekas schrieb am Di., 31. Jan. 2017, 13:45: > > > > As noted in the RFC, this isn't possible due to ambiguities with array > > keys and yield expressions with keys. > > > > There are not ambiguities technically, so it is possible if we want to: > > $a = [ > $y => 'b', > ($x) => $x + 1, // key, value pair > ]; > > $a = [ > $y => 'b', > (($x) => $x + 1), // closure > ]; > Well, it is ambiguous. Your solution just arbitrarily resolves it to one of them. But as far as I know there are more problems like supporting types that make it quite complicated with that syntax. Regards, Niklas > --001a114a7f8a103c0305476390fd--