Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118123 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87013 invoked from network); 29 Jun 2022 15:39:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jun 2022 15:39:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 99C22180538 for ; Wed, 29 Jun 2022 10:30: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=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 29 Jun 2022 10:30:32 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D92675C055D for ; Wed, 29 Jun 2022 13:30:31 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Wed, 29 Jun 2022 13:30:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1656523831; x= 1656610231; bh=K/V/mtcG+6oCshDmlxJCrRLMehwgPdr+yOPbRf/YT20=; b=e kn9SrQp5C0f/C79gM7cNlCuzr/up90CxmxEBnlRGzq8OET3HNtljy6zLm1h8Crbi /+HFR848OuPCFEglA+JEQ0UrGVEbVZzM3vdGjPKwLMmfmwm+BobDBBQOaaXJxjN9 BvNbztuMEOejdYJnaBdkR0wyibtoFtJMGMN2NkV4VAQT0bgvc+dWVYQ0zRwG0EgY 6wGwRSKZmOnMrSUYUggMn7fMSFIrmZ8t4g2ECTAh7y63gQdMceRfPumCDxEfmsMQ Gp/x0+NHdslBRgsWptZ+YoQPh/67z6B3WqEctWP56HjhwaZNKyakaMZbcXVDIUBN hh55C8RD4Kz4JmAZvJ7NA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1656523831; x=1656610231; bh=K/V/mtcG+6oCshDmlxJCrRLMehwg Pdr+yOPbRf/YT20=; b=CuTpjMHoZUTLJQwoHv/MI4cWRozWuRYFcgNGsgdp/4qW oLE5UBeeaLwCeg282fNrGpJpzTay51FCH08ke/NC3XA6/yLj/TfGoCTC6QAUyaG2 wFmdKuAFR0fO1aZWNUdXYNHd0sWb34xZMPhyE5AfD6YjzLYX4MsJWZxE01i0AFhV 2+BHMbPka1wOYOYvm9oji4Z7GP70ilfA69QLAinARyuUzXcXsjhCss16XqUkKDDo S1hJ4KMu9sIAqnQ6jGhkx9FYI9rvCmGgm6h/2QdrnY7sLzYAr+nrAZj+XR8/ENzk MDct8Wk9F0weszWSP9SPfPeQlAs9isca66rRslogUw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudegledgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepveehhedvveejledvvefgleevffdtjeekledvkeeg heffgfeivdejhffhledtudetnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhf ihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9A3EA1700077; Wed, 29 Jun 2022 13:30:31 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-713-g1f035dc716-fm-20220617.001-g1f035dc7 Mime-Version: 1.0 Message-ID: <84eb5551-cfaa-42e6-9a74-ae229d5e269c@www.fastmail.com> In-Reply-To: <2b35605f-8da8-46b1-aec3-00bd1bfe47fd@www.fastmail.com> References: <2b35605f-8da8-46b1-aec3-00bd1bfe47fd@www.fastmail.com> Date: Wed, 29 Jun 2022 12:30:11 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3 From: larry@garfieldtech.com ("Larry Garfield") On Thu, Jun 9, 2022, at 11:34 AM, Larry Garfield wrote: > Last year, Nuno Maduro and I put together an RFC for combining the > multi-line capabilities of long-closures with the auto-capture > compactness of short-closures. That RFC didn't fully go to completion > due to concerns over the performance impact, which Nuno and I didn't > have bandwidth to resolve. > > Arnaud Le Blanc has now picked up the flag with an improved > implementation that includes benchmarks showing an effectively net-zero > performance impact, aka, good news as it avoids over-capturing. > > The RFC has therefore been overhauled accordingly and is now ready for > consideration. > > https://wiki.php.net/rfc/auto-capture-closure The conversation has died down, so we'll be opening the vote for this tomorrow. Two changes of note since the discussion started: * The option to mix explicit capture and implicit capture has been removed as too confusing/unpredictable. Either trust the engine to capture the right things (the new syntax proposed here) or explicitly list everything (the existing syntax we've had since 5.3.) * We added a section discussing the `use(*)` syntax alternative, and why it wasn't, er, used. (Pun only sort of intended.) --Larry Garfield