Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87990 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52354 invoked from network); 1 Sep 2015 09:48:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2015 09:48:17 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:54942] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/C4-27722-F5475E55 for ; Tue, 01 Sep 2015 05:48:16 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id B50B7E20D6; Tue, 1 Sep 2015 10:48:12 +0100 (BST) Date: Tue, 1 Sep 2015 10:48:12 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Bob Weinand cc: PHP Internals In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] [RFC] [Discussion] Short Closures From: derick@php.net (Derick Rethans) On Mon, 31 Aug 2015, Bob Weinand wrote: > I had this RFC in draft since some time, but delayed it due to all the 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 The RFC writes: > The symbol ~> was chosen as it is a mnemonic device to help > programmers understand that the variable is being brought to a > function. I don't see how this is a mnemonic. I am also struggeling seeing the difference between -> and ~> in certain fonts. > Currently Hack has implemented shorthand anonymous functions using the > ==> symbol to define them. > Additionally, ==> in Hack has slightly different semantics, hence we > decided, it's better to not reuse that symbol What are the difference in semantics? Why not just copy the Hack semantics (and hence, then also use it's symbol)? cheers, Derick