Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98172 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50896 invoked from network); 4 Feb 2017 07:37:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2017 07:37:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:49384] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 21/90-38491-5D485985 for ; Sat, 04 Feb 2017 02:37:58 -0500 Received: (qmail 118443 invoked by uid 89); 4 Feb 2017 07:37:53 -0000 Received: from unknown (HELO mail-qk0-f178.google.com) (yohgaki@ohgaki.net@209.85.220.178) by 0 with ESMTPA; 4 Feb 2017 07:37:53 -0000 Received: by mail-qk0-f178.google.com with SMTP id s186so12497684qkb.1 for ; Fri, 03 Feb 2017 23:37:53 -0800 (PST) X-Gm-Message-State: AMke39mJHsTcRjpSqAGd9GgwA3Rlww5IGQPY9cbL7dieHIIbAL5u+WkzqydkE3TGDLrqdeG7WBCX4ZN+DReNAQ== X-Received: by 10.55.67.135 with SMTP id q129mr901507qka.98.1486193868086; Fri, 03 Feb 2017 23:37:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.19.232 with HTTP; Fri, 3 Feb 2017 23:37:07 -0800 (PST) In-Reply-To: References: Date: Sat, 4 Feb 2017 16:37:07 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Levi Morrison Cc: internals Content-Type: multipart/alternative; boundary=001a1148a27a93289f0547af792e Subject: Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1148a27a93289f0547af792e Content-Type: text/plain; charset=UTF-8 On Sat, Feb 4, 2017 at 4:14 PM, Yasuo Ohgaki wrote: > >> fn(params) => expr >> |params| => expr >> >> I look forward to more discussion! >> > > It's unfortunate we cannot have HHVM/Hack syntax now > https://docs.hhvm.com/hack/lambdas/introduction > > but both > fn(params) => expr > |params| => expr > would be good enough for now. I don't see much problem with > |(int | float) params| => expr > One question. Does the syntax allow chains? function chained_allow_func() { $f = |$x| => |$y| => $x + $y; $fn = $f(3); return $fn(2); // Returns 5 } It would be great if this is supported. Thanks. -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1148a27a93289f0547af792e--