Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99441 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82745 invoked from network); 7 Jun 2017 19:45:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jun 2017 19:45:32 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 74.125.83.41 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 74.125.83.41 mail-pg0-f41.google.com Received: from [74.125.83.41] ([74.125.83.41:34328] helo=mail-pg0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/F8-27119-BD758395 for ; Wed, 07 Jun 2017 15:45:31 -0400 Received: by mail-pg0-f41.google.com with SMTP id v18so8523373pgb.1 for ; Wed, 07 Jun 2017 12:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kj3k5Z+rGGxrSgH9yM4Utl4eDe8j8e+n5z+lIPO9Qlo=; b=O8WSuL4s9tjkDQFYK2BvOJ5tYsMq+lzB7lBhc+7lG12bc59LeZ/Q26FpYPrRYlIaMa sYwAD9mJcJ7MZvD6oCbj3knuupLdvmO1K0UK2gy9kA7w9ewKPzvSkNLs2DWf3IzIa+s1 c229iGNTxNeFL8dyo4+cdpNKzl/spwqBhjA8taeqT/mgrFj4ubFGQPJJxYnZOovIPN9e oMEZ4xqrsGPvEsCmo4tGnm8wNIw0y8ZtCtg4VpfaGYlzHRpEX9QQgJ13sCeLQyD5woE3 gczd8KrnvG4iNOCiSx5JNEaiLHh1vLVcsofBP8dXZRs7cN6gnlbzqbPuCKKi3Twx6gLP YxXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kj3k5Z+rGGxrSgH9yM4Utl4eDe8j8e+n5z+lIPO9Qlo=; b=EYyMybb8Gy/z4YTWjhBS12c0D9vimSngsdQiTx6oTzKKEVmo/g/oWSOsLn+3WdBOLP U4rlLBdZuN8DT0V48kj7jtHMUHABQyKtKrTRFimJtTmNJN9bH9BdBL+7nlOWbieFN7jJ kAnJot5s9GnfHSM1E8zH6H3qu/YRdv5CvZMpqrKv3Qj8vh2f15nYID66tJ7u4y3/0W8o FIxHOk53yVPk08pACFKhzS72UlQ9uyC6z5VKm3+uHkukK9CqBkKMU1qVu6NO753+W38Y FGezJ6P7Eab0r7b2LWpsTyul4kwHoKj4uccq5wiSB+oUAu1PRfWnwzCWavmfqgu66eMN 5Sug== X-Gm-Message-State: AODbwcCiAz4zqm6xcrngkzxf9sVyk/NnJO4p/LPlKIQKEIz/d6fTqx+a zhafnKhSm73VUspL3st4qQjTVD3vmncV X-Received: by 10.98.58.217 with SMTP id v86mr9329745pfj.115.1496864728448; Wed, 07 Jun 2017 12:45:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.131.23 with HTTP; Wed, 7 Jun 2017 12:45:27 -0700 (PDT) In-Reply-To: <4FBDE643-1EBC-485A-A39F-7E28C5D4807A@koalephant.com> References: <6357d97c-3f2e-4cf8-cb1f-cb7f7ccccf7c@telia.com> <7eaef49b-bf60-9aa1-e812-8430164e3178@garfieldtech.com> <3F920987-38CB-42DD-888D-824430C36F14@gmail.com> <2f9e73c9-444a-11d0-459a-e261ea8a7080@telia.com> <4077c099-2247-c3c1-7dee-02a6b25f8586@fleshgrinder.com> <559b73f7-c40f-e593-f0e1-51b56210d7cb@telia.com> <2053A608-6B66-42FB-A6D7-7CC64E94DA6A@koalephant.com> <4FBDE643-1EBC-485A-A39F-7E28C5D4807A@koalephant.com> Date: Wed, 7 Jun 2017 21:45:27 +0200 Message-ID: To: Stephen Reay Cc: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= , Ryan Pallas , Fleshgrinder , PHP internals Content-Type: multipart/alternative; boundary="94eb2c11350c6a9afb055163fab6" Subject: Re: [PHP-DEV] [RFC]Discuss] Syntax for Arrow Functions From: rasmus@mindplay.dk (Rasmus Schultz) --94eb2c11350c6a9afb055163fab6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > the `fn($a, $b) =3D> $a + $b ** $c` syntax suddenly becomes an acceptable compromise. I have to second that. I might even propose to shorten it from "fn" to just "f" - the resulting syntax then resembles a mathematical predicate :-) On Wed, Jun 7, 2017 at 5:20 PM, Stephen Reay wrote: > > > On 7 Jun 2017, at 20:37, Bj=C3=B6rn Larsson > wrote: > > > > Well, one reason to use fn or even lambda was to signal that this is > > different then a regular function. > > > > When it comes to number of keystrokes I guess that some inspiration > > has been taken from other languages supporting arrow functions, like > > Javascript & HACK. > > > > I also recall from earlier discussions, that with less keystrokes it's > easier > > to read when an arrow function is embedded / chained into another > > expression / statement / function call. > > > > > I think its pretty clear my pref is/was #2, but when compared to the craz= y > alternatives people have been suggesting, which just seem to be =E2=80=9C= hold down > shift and blindly poke at the non-letter keys for a while=E2=80=9D, the `= fn($a, $b) > =3D> $a + $b ** $c` syntax suddenly becomes an acceptable compromise. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --94eb2c11350c6a9afb055163fab6--