Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105313 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92192 invoked from network); 18 Apr 2019 00:12:54 -0000 Received: from unknown (HELO mail-qk1-f177.google.com) (209.85.222.177) by pb1.pair.com with SMTP; 18 Apr 2019 00:12:54 -0000 Received: by mail-qk1-f177.google.com with SMTP id z76so15237659qkb.12 for ; Wed, 17 Apr 2019 14:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p76rQSuCEV4/9ZPs7kj4ykfYxKIc+ejx/5GRq1BQgRs=; b=NN9TgS2YkUFc3RxUq+d9pf5yV1dG7aZgq4fWgE48gEkLzHeZYH8AHXvCNY56z17w+/ ytx/piZMmgwDi7t729bzF9liPk2HQhGuql/TVON2cIiIXGtG1WoPFI3UBaR56bsZpKuE +xaLBF4yPwRiwSSM2VRgHigV/9AXCBdlak6jU3gEtYywFo1h091xdnNNEwDZ9/nce0sm V4Qft4dRt28FhqVNbQhvueebFhjRgCDe1CQrum/RpCFVI0R4TEfL559m0BRz0hMkCI8e AVypvsMjuHnLHbnKJTpcewRad/tAgQVD80g57ugxId3Op+g4JiFpxj7r5pZlfXV79Tq0 Htqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p76rQSuCEV4/9ZPs7kj4ykfYxKIc+ejx/5GRq1BQgRs=; b=FRPP42Rmh8SEGkI9tWD6hqRvzc4Hpl/Ba4DVhfRWFgBkpgsoQ+wWb4auHM2Fe+0x8b 3AgydpnY7dLRFUNPpDeqC6q87Rua3OAT9PvfiMxSrSvv6D1WvrrwfwAk/33Ep2y+dkV5 icoCjGDWrUi7jDgEL2LS6oGTZxltkjfokETou8kUwv8p836JD/BGk6ICsZ3/j7lILqDj Z8vhjiivTWnus9QDWkQXorHs1SX12P9snDt3crwK81QWiRNuqTRHpyGBfidXYTo9O8aY kXz5CAKvogkGUhS9ctls4fh2MCHroqgC9OB2XoyA8r0hyilQPMsfoCAgFEXGf/vM7bSP PxNQ== X-Gm-Message-State: APjAAAWiU9Qng5te2IlpsJqREyP/A8OUC0Br9NTrP8XbCsVAF9BzWfg3 51v0y7AD0VpaiAkPKwM1QlBz4zXN4dIb3d9bilU= X-Google-Smtp-Source: APXvYqwDZJTe9OY+ZlzGXxuwVTwJBdz84TP+0hdWib3uldwIzCnofHC1ryHW52MZowkGKTkiFdjf7LM8YUtWfHYaNI8= X-Received: by 2002:a37:353:: with SMTP id 80mr1542087qkd.344.1555535512381; Wed, 17 Apr 2019 14:11:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 17 Apr 2019 23:16:28 +0200 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000a6b1a50586c05523" Subject: Re: [PHP-DEV] [RFC] Arrow functions / short closures From: netmo.php@gmail.com (Wes) --000000000000a6b1a50586c05523 Content-Type: text/plain; charset="UTF-8" I like it. Only exception is: ``` fn&() => ...; ``` Which I would prefer to see reserved for the purpose that you've written as: ``` fn() use(&) => ...; ``` The & symbol of "return by ref", should be placed on the right of the parentheses, near the return type: ``` fn(int &$x)&: int => $x; fn(&$x)& => $x; ``` The same thing could be allowed on regular functions and methods. currently you'd write ``` public function &bar(): int{ /* ... */ } public function &baz(){ /* ... */ } ``` Since 7.4 one would be allowed to write this to mean the same thing: ``` public function bar()&: int{ /* ... */ } public function baz()&{ /* ... */ } ``` Would you guys agree on making a second RFC later changing this after and if this RFC passes and before 7.4 is released? --000000000000a6b1a50586c05523--