Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113740 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 5002 invoked from network); 24 Mar 2021 16:24:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Mar 2021 16:24:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 764111804F4 for ; Wed, 24 Mar 2021 09:20:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 24 Mar 2021 09:20:31 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 124745C0116 for ; Wed, 24 Mar 2021 12:20:31 -0400 (EDT) Received: from imap8 ([10.202.2.58]) by compute4.internal (MEProxy); Wed, 24 Mar 2021 12:20:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=KocgEfhoQ5y/81sNcxHpCSoDZKSoU yRoi19ZjMjdy+Q=; b=Hfos1f0r+10FKimVFGa9+p4MGgVVWrUnzGKvr50jJ6AWZ xHO/8aVahG7kX/3QigUPzuxIgCbhPebYzyPHBcODOh4uM0wSH547ygEV2wYFkvuO mYFkELEEcHb6weJi901h6PNFdmRRsi20unyp36ZVSOQfRMy4FrGjLeCxZUPZfa7/ 6yUBxhCJ7bgK0ZBelBFrNRALMSCo7MMAiMKnB2UyskuWuHoMOYSC94b+Ec58LhO/ 8kgxyS40RHJpxzIQBu1uN0OvQeIfTSmb88VYOcw0yuAiHbhahlzqIcze1Ad/aLaN 9w4uNeSa8pGsO1MzFSSoOz6XIpt5NvAZJUwewBspQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegkedgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkfffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeegheffiefhtdekfeevffeuieeihfejudfhuefhtdetleel hfdvjeetkefggfeuieenucffohhmrghinhepphhhphdrnhgvthenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghl ughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9DC7A3A0824; Wed, 24 Mar 2021 12:20:30 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249 Mime-Version: 1.0 Message-ID: <88c9eb5f-f80c-4869-b7f8-1b58b9e2eaa3@www.fastmail.com> Date: Wed, 24 Mar 2021 11:19:58 -0500 To: "php internals" Content-Type: text/plain Subject: [RFC] Auto-capture multi-line closures and short functions take 2 From: larry@garfieldtech.com ("Larry Garfield") Greetings, Internalians. Some months back I proposed an RFC for short functions. https://wiki.php.net/rfc/short-functions After some discussion, I put it on hold to ensure that it was compatible with the other discussion floating about around an alternate syntax for multi-line closures that did auto-capture. It's important that the syntax of both proposals is consistent. Nuno Maduro and i have talked recently and worked out the syntax that is consistent between both proposals. That takes 'fn' off the table for short-functions, for reasons discussed in both RFCs. To that end, I offer: 1) The updated short-functions RFC: https://wiki.php.net/rfc/short-functions 2) A new RFC, code by Nuno, for auto-capturing multi-statement closures: https://wiki.php.net/rfc/auto-capture-closure These are separate RFCs and at this time we plan to send them to separate votes, but I list them together to demonstrate that they have been developed in a mutually-compatible way. Further details in the auto-capture-closure RFC. -- Larry Garfield larry@garfieldtech.com