Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88088 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95092 invoked from network); 7 Sep 2015 11:21:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2015 11:21:38 -0000 Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-lb0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:35677] helo=mail-lb0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/78-40368-0437DE55 for ; Mon, 07 Sep 2015 07:21:37 -0400 Received: by lbpo4 with SMTP id o4so37783696lbp.2 for ; Mon, 07 Sep 2015 04:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=aDkvG9VMmV86H1Ck3QU9wfTGTA0Y1qcOL5jc1tM60x0=; b=Fax7Gv2guaRI03n3BDBgspFYcWIB4BAXZ4c+rUacuWnm9iiV9oFYYgshOgf0MoEAra f93GkrbbnMjLTVIOKvfw19ctSkjcHJh8ssvUV+EW5Cqj5pvYFQk93BTVKVrmmdZQ63/P 6HaW5IFtj6soQknRf3h2TOcUKFQjFCJddVmV44T+LqeFEEQypFa6T29brYOEnbShagZS 2oN7D2hR/X3O8VjusyIJ1lswUVIh0vsDgibV+aRzZZKZyngSQ/w9mVN0qD8GU3wnzl0I rg7YKYLB8Pw5Io+Lzd2Ge8Rcm80HQa+bC1rlB9BfrBc8cVPGVYtqoGplU1iYb7S6neAo IFmQ== X-Received: by 10.112.170.103 with SMTP id al7mr16541355lbc.66.1441624893199; Mon, 07 Sep 2015 04:21:33 -0700 (PDT) Received: from nikita-300e4c-300e5c-300e7c ([89.250.5.98]) by smtp.gmail.com with ESMTPSA id w9sm1238681lad.41.2015.09.07.04.21.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 07 Sep 2015 04:21:32 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <009001d0e949$aa28a820$fe79f860$@tutteli.ch> Date: Mon, 07 Sep 2015 14:21:30 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Message-ID: In-Reply-To: <009001d0e949$aa28a820$fe79f860$@tutteli.ch> User-Agent: Opera Mail/12.16 (Linux) Subject: Re: AW: [PHP-DEV] [RFC] [Discussion] Short Closures From: inefedor@gmail.com ("Nikita Nefedov") On Mon, 07 Sep 2015 11:46:18 +0300, Robert Stoll wrote:= > Hi Bob > >> -----Urspr=C3=BCngliche Nachricht----- >> Von: Bob Weinand [mailto:bobwei9@hotmail.com] >> Gesendet: Montag, 31. August 2015 21:29 >> An: PHP Internals >> Betreff: [PHP-DEV] [RFC] [Discussion] Short Closures >> >> I had this RFC in draft since some time, but delayed it due to all th= e = >> ongoing PHP 7 discussions. Also we have no > master >> branch to merge features in until 5.4 EOL. Thus I'm reviving this now= . >> >> Time for the first RFC targeting PHP 7.1 (assuming PHP 8 isn't going = to = >> be the next version ;-)): >> >> The short Closures RFC: >> https://wiki.php.net/rfc/short_closures >> >> Hoping for constructive feedback, >> Bob >> -- >> PHP Internals - PHP Runtime Development Mailing List To unsubscribe, = = >> visit: http://www.php.net/unsub.php > > I would like to see a short syntax for closures in PHP but would sugge= st = > to use different symbols for the operator. Why > not use --> ? > --> is a shift-reduce conflict. It's undecidable if this expression shou= ld = return boolean or a closure: `$foo-->$bar` (is it `$foo --> $bar` or `$foo-- > $bar`)