Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43280 invoked from network); 30 Jan 2017 23:31:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2017 23:31:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.67 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.215.67 mail-lf0-f67.google.com Received: from [209.85.215.67] ([209.85.215.67:34054] helo=mail-lf0-f67.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/7D-51557-8CCCF885 for ; Mon, 30 Jan 2017 18:31:21 -0500 Received: by mail-lf0-f67.google.com with SMTP id q89so32593891lfi.1 for ; Mon, 30 Jan 2017 15:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0y7eiww4vJhUK9V15Bbc8GEads9zoch9kN1A8Kvp8KM=; b=l2Pjiby3lgw8ZvCZE31dVI+GdFm7gQAWVrEAtandZAmPjSCXzeCVcYsoJsC/Vcynnm CNBE//LpejTyLp9C74zl33771ZXVAForBp/hsFU5onsGkeOXz+8lapDaoxegTGe+ep6S TlgyDZOnC/VPxqnmbDVloj/y1n5nQ26V8TkpNpX/fc/3lP9TrIiDl2TP+F6gpq9NXbzs wlfmvEK5j6YhoUwfY0LKfQd1TyPQJrQSTWSyvLnLF8wo63RwQko0FpfuCcby9ztTnAhA 3qvmD70J6lO3GRE1cx2fpab3vR4rszYo2r1SOlrdul0OFuc003xayHFlr+UTQHbfg0Ct TGNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=0y7eiww4vJhUK9V15Bbc8GEads9zoch9kN1A8Kvp8KM=; b=tTq2HQMWk/rhq0BPdhdfHdAtGYx6BIvFJE/E4jKHFWpmXivoV1t9HgizC7eEuFbpHA yfsRawC5nGSqsKVWq9SYk+kLotrE5dTK1pjSDkIAg2lvpIF0e+nmAUnLpDl72+h0IkaN 16nIl7Uk3fh4tSP3FkX5qEd0aWaUp8G6OA9m1hzDzqmBiCiE8VDm3Qc7swXrnjpKSqUp hQgXGMV3rdguuJGIOdry5LqPVpvFi1XucO2u9QpctT0/sa28ayPwnitB5G8zJ3fsmkQr 292sCbZDb+vGq5rbmmTLVNupEciWxeN3yJsIqfNLC+eDRuPFRTmEQjEptXn8iNf9jySS +1Hg== X-Gm-Message-State: AIkVDXJTYVakFINiB4dp7xxJH8RRF2ycGdoVPdOjrrHg2muBSJjpGY0E2Gsf6jQNzpHPmBiUjjYdWZb9bg2Ciw== X-Received: by 10.25.17.198 with SMTP id 67mr7741266lfr.39.1485819076336; Mon, 30 Jan 2017 15:31:16 -0800 (PST) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.25.151.139 with HTTP; Mon, 30 Jan 2017 15:31:15 -0800 (PST) In-Reply-To: <5cfd2ff9-d4b1-e1cc-e4a3-c3b26b9b7fba@gmail.com> References: <5cfd2ff9-d4b1-e1cc-e4a3-c3b26b9b7fba@gmail.com> Date: Mon, 30 Jan 2017 16:31:15 -0700 X-Google-Sender-Auth: F_f7KTCaL8R8n6hOv4EfLV8fFkA Message-ID: To: Rowan Collins Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][Discuss] Arrow Functions From: levim@php.net (Levi Morrison) On Mon, Jan 30, 2017 at 4:05 PM, Rowan Collins wrote: > On 30/01/2017 17:55, Levi Morrison wrote: >> >> Bob Weinand and I are happy to announce that the [Arrow Functions][1] >> RFC is moving into the public discussion phase. We have been >> collaborating on this RFC for many months now and finally have a >> proposal we are happy to discuss in the open. >> >> [1]: https://wiki.php.net/rfc/arrow_functions > > > Firstly, I like this proposal a lot more than the previous, so thank you for > working on this based on previous discussion. In particular, I'm glad to see > it focused on single expressions with implicit return, as I think that's > where it has most value. > > A few comments: > >> ThisRFC does support type declarations for parameters and return types. > > > An example of the syntax for this would be good, particularly how the return > type fits the syntax (which may conflict with my suggestion below). They go in the same places as regular functions. I'll update the RFC later with examples, but for now here is an example that takes an integer and returns it, which type declarations: fn (int $x): int => $x