Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38753 invoked from network); 15 Jun 2017 13:34:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jun 2017 13:34:10 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 212.232.25.162 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 212.232.25.162 mx206.easyname.com Received: from [212.232.25.162] ([212.232.25.162:42432] helo=mx206.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/61-30621-2DC82495 for ; Thu, 15 Jun 2017 09:34:10 -0400 Received: from cable-81-173-132-37.netcologne.de ([81.173.132.37] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dLUuT-0007bG-Fs; Thu, 15 Jun 2017 13:34:07 +0000 References: <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> <034f3ebf-95b8-a7cf-1279-77c7cf0424d7@gmail.com> <46143e7c-ef75-7c05-eaa9-98c8f3b405f1@telia.com> To: php-internals , =?UTF-8?Q?Bj=c3=b6rn_Larsson?= Message-ID: Date: Thu, 15 Jun 2017 15:34:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TITQW50kIh5T9LLw5nqFtjTBgj487VMhC" X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] [RFC]Discuss] Syntax for Arrow Functions From: php@fleshgrinder.com (Fleshgrinder) --TITQW50kIh5T9LLw5nqFtjTBgj487VMhC Content-Type: multipart/mixed; boundary="CI3PT13BpOj7Mp3a9Pqdwit0D1G55056u"; protected-headers="v1" From: Fleshgrinder To: php-internals , =?UTF-8?Q?Bj=c3=b6rn_Larsson?= Message-ID: Subject: Re: [PHP-DEV] [RFC]Discuss] Syntax for Arrow Functions References: <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> <034f3ebf-95b8-a7cf-1279-77c7cf0424d7@gmail.com> <46143e7c-ef75-7c05-eaa9-98c8f3b405f1@telia.com> In-Reply-To: --CI3PT13BpOj7Mp3a9Pqdwit0D1G55056u Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/15/2017 3:29 PM, Bj=C3=B6rn Larsson wrote: > Seems like the constraints on this feature makes it hard to fly, i.e. > 1. Not a hackish implementation > 2. Non ambiguous syntax > 3. Easy to parse & use syntax for the human >=20 > HackLang then prioritised 2 & 3 making the end-users happy, but > had to sacrifise a clean implementation. Any clue if this was a one- > time effort once it was done or something with a lot of drawbacks > in terms of maintenance, performance, evolution etc? >=20 > r//Bj=C3=B6rn >=20 On Reddit someone proposed the following syntax: \() =3D> echo 'Hello, World' It is used by Haskell if I remember correctly and should not be ambiguous since `(` is not allowed in names of classes or functions. It actually aligns well with functions that are called with a fully-qualified name (e.g. `\printf('')`). Not sure if it would still require hacks though. --=20 Richard "Fleshgrinder" Fussenegger --CI3PT13BpOj7Mp3a9Pqdwit0D1G55056u-- --TITQW50kIh5T9LLw5nqFtjTBgj487VMhC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZQozLAAoJEOKkKcqFPVVrs0kQAJRHNWmZe9A7+A8S9UwRslXZ cvs3G/1Qpma4Bi4UIKcS2nhywRp4IiHS8GzXgjVDLFZYNaS2qQZW09efGczERq3x an6jSVAlvOV19I3n0zFMiBjmimWZhBdMwzNom9iZBxHOzq78sxReHHGb4E6ChJal G/QF2ks9Xzh+gk+3fmHJ8N4LDDX9ReTHeIxiJWCivBu9hY1MWTI25ZFbO164hUVs 67u/Y1U2hyrY/dPq4Y0q3S+LHzmhF4v9JlTqHtZ+KwlzTX7/qwXtjWce3Agi6nZr XiwEiscsL+naIG8lfJvSdvn1iAbcsT0/9HyWg4Bu6P3AGkB9lohMPoLJqrgOuCtl 6v4Qjn0RPpkfyow/X4+TEC9e5ifuzuLHWv5mY47KagaVf4J9GrTu3yl/SEcXWc5q 3GumecbhxsujEYzY1+XIA3XmF7/VRehycdAw3qsy0YPvvTvlheR7Ub+ddlT4/DWq iSpfyBql5alUbw9jaYuz9AbUPYc1AswWCgvQKqUKMkdwmr57gJurIG4ofPongrct H0HoH9rp2I5AZC3WG2FZxAmvNuGpy2dAQM/ZrRMXhCNAPQMJ5yvRySL2p8yBximV NKCZD/wHEGAKZJxsyub/TTtm72//S1DzGTCjkxTFU67o6GuyWwrY3dD/ePWIzgBN Fharqk/jivyNoAsIR6ke =hkxX -----END PGP SIGNATURE----- --TITQW50kIh5T9LLw5nqFtjTBgj487VMhC--