Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104732 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37048 invoked from network); 15 Mar 2019 12:40:07 -0000 Received: from unknown (HELO mail-io1-f43.google.com) (209.85.166.43) by pb1.pair.com with SMTP; 15 Mar 2019 12:40:07 -0000 Received: by mail-io1-f43.google.com with SMTP id f6so7660642iop.3 for ; Fri, 15 Mar 2019 02:30:43 -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; bh=F5OYp04ysTLUCG0tRON4xXi2NW+04p4Vbw3U00Y5Uek=; b=XxxCR0p212V28Yz4Fl3GrAiQZ+a0axWR2mnVC4/XyCOIXn6kar/653BFzDy60mAFvZ nfGr4oQbsPM1aEI8gDSu7ThPPhAXJrGj1SXcizkI2qY09Bg79jNxTbufrw06iWDFrtPi 0y1D49dAgzQO9KareqMPc+BbetzKgH4TsPjCl+YksZ8eu3sNU+rZfLuBEO2agkjoIYMi gc7zEgfMbYDtziyfcllRPXXei9TyD851CHWB3R4x+XcuBKDrUHYngSk3Xba46qaLQTqH CinJZ/fqkjE+v1kSOVWnPxRxBeZ3Kb9Jp/8pAL9dOtZlHNZKcs+4TnkeUwE2vmyCyqNj prgw== 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; bh=F5OYp04ysTLUCG0tRON4xXi2NW+04p4Vbw3U00Y5Uek=; b=jnK/hANquoK0RyktVDVTXJteV7CO9gTMArR6dnicmco3Wk0bI83tbcMzlwMfSOFI4I uXa2kh4KEYOdkaUDme8jaekRWSxHTEmOema2oxNcsJ7NGXKY68MDTkmd/Vbe6HyNTJ98 368j/6SGxUaXiDMzLlPAdWlTbJLaWQaB/fYbfwMZz5n+O8VKS9w/mRC+aF52j+IXtidc 6JvXsZ4Y2YxVIKdTiKyOccuDUsRVM3UVTFWp+nJempU3MqVggvfL3IXpa3CwB3CliqOw p6f2urK+wAuyHl2icmwpINrnV2ooxtZcvfNrYw3D6Zx8iVEg8bbJbL66LXSjUF3SoPev 9uKQ== X-Gm-Message-State: APjAAAVHh/oDxUNq+jtUXjCP0tEXKdPrLlFojWJyj3Tbmmp6tlDtrz8q mc7C1H4zkCUrW8pMKOAp1HdQMIv0LTaDJjoDWdq7hoFx X-Google-Smtp-Source: APXvYqwQ4D9rHW45idOByPhLwkXVi6UeAXy8uL/61Sjvvk7VHGLaDvUrjZcL/Vbp+uiEMMi4TNq1hy9j93IYNYh1Kcw= X-Received: by 2002:a6b:6d15:: with SMTP id a21mr1395923iod.235.1552642242810; Fri, 15 Mar 2019 02:30:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 15 Mar 2019 09:30:32 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000005896e305841eb128" Subject: Re: [PHP-DEV] [RFC] Arrow functions / short closures From: rowan.collins@gmail.com (Rowan Collins) --0000000000005896e305841eb128 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 15 Mar 2019 at 09:01, Alexandru P=C4=83tr=C4=83nescu wrote: > My question would be: whatever syntax we are going to use that has arrow > syntax, let's say *$f =3D \($x) =3D> $x * 2;* are we going to also suppor= t the > arrow block version?: > *$f =3D \($x) =3D> {* > * // more operations that will have better visible on multi-line* > > * return $x * 2;* > *}* > See "Future Scope" in the RFC: > This feature is omitted in this RFC, because the value-proposition of this syntax is much smaller: Once you have multiple statements, the relative overhead of the conventional closure syntax becomes small. We shouldn't pick a syntax that rules it out, but it can be added later, with a separate RFC to discuss the benefits and details. Regards, --=20 Rowan Collins [IMSoP] --0000000000005896e305841eb128--