Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117930 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20813 invoked from network); 13 Jun 2022 10:42:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Jun 2022 10:42:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3FBE918037E for ; Mon, 13 Jun 2022 05:29:56 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 ; Mon, 13 Jun 2022 05:29:55 -0700 (PDT) Received: by mail-wm1-f44.google.com with SMTP id c130-20020a1c3588000000b0039c6fd897b4so1446385wma.4 for ; Mon, 13 Jun 2022 05:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jTit9eIXJz3U8vbljlXqf3iJRpYcy2FfTBxwrN4+enw=; b=U3nrijV7EJivxt57vyhtt9AnpslTez0pRK6JMDSExvrnwiPWvD88Kaq5uXXi5KxTsB +oqNxw7u9zNue8yzHqXMuZ2UjAHilYvh2fHeXMV8GnCzrdj00iaYk2sU/BZ6PdrxzpX4 aqH4Wu2EjnM9fRfKs+5X5+3yntJesPonKASJLoewRKTQ01hhyuBSYJNU2vA7gQIu4D/j 9K0fiRv2jhoTOzQQlPwrB7kmdvKbxfoYufF0zxAHKA+LRJPfQHokJZj8qiBzJzuoCAFi 18O5el/PvGuxMsGIYukg8WMZDffGZJ81xBrhpsRuc2hAZ0MNINA6V3WAc2jkXv5JC2jv YJQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jTit9eIXJz3U8vbljlXqf3iJRpYcy2FfTBxwrN4+enw=; b=czbjcddTibETGuBXaMJYNTE8XRN5IbwgRi61eAOaS9JjqwOP6tBN0rCIuPbj9WnKXd S/Qbe8pbYDwsQmt+Rlu/aF9/Bhw9i482/DSjCRgBI0CI3r134aN005hKTwG9Cs34nucM nGn5iH+RrLGihZGgD0JEEPri3IM76aJiVekVDudKA7icLFXj82Ye6k370SKs3WrcmfW3 0+wcm7LBXei530SfFqB6VcYH59lZztIqX8ysrdeWAOm0pyRnn1OvDGIeeH0Pha9TEOta BHnok/fxYCbvNWsqUUOLku5QDP3xvW+aAlmc32G1LlJAJ99sR+nqxT8bZ4QOuetC60d2 mTOQ== X-Gm-Message-State: AOAM530mXsb/Az0x5lFmcP4nNaY7jyEmtP3BaBxjA7S9vKi+OMnQW9Pk x6zAnZIeISWi5/sjvNPncqM= X-Google-Smtp-Source: ABdhPJzaAROZq6BmCntZlRjQpa1bA1XFNMZ+SxOKE+g2YfUqPz4lFHr1wIqG/kYdIMAI4bl3vFx8PA== X-Received: by 2002:a05:600c:4f96:b0:39c:7bd0:d4c8 with SMTP id n22-20020a05600c4f9600b0039c7bd0d4c8mr14412379wmq.16.1655123394546; Mon, 13 Jun 2022 05:29:54 -0700 (PDT) Received: from arnaud-t490.localnet (2a01cb04054b5b0000c66a4556b36e2a.ipv6.abo.wanadoo.fr. [2a01:cb04:54b:5b00:c6:6a45:56b3:6e2a]) by smtp.gmail.com with ESMTPSA id v187-20020a1cacc4000000b0039749256d74sm13298768wme.2.2022.06.13.05.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 05:29:54 -0700 (PDT) To: Larry Garfield , internals@lists.php.net Cc: php internals , Dan Ackroyd Date: Mon, 13 Jun 2022 14:29:53 +0200 Message-ID: <3564811.oiGErgHkdL@arnaud-t490> In-Reply-To: References: <2b35605f-8da8-46b1-aec3-00bd1bfe47fd@www.fastmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [PHP-DEV] [RFC] Short Closures 2, aka auto-capture take 3 From: arnaud.lb@gmail.com (Arnaud Le Blanc) On dimanche 12 juin 2022 20:05:02 CEST Dan Ackroyd wrote: > On Thu, 9 Jun 2022 at 17:34, Larry Garfield wrote: > > That RFC didn't fully go to completion due to concerns over the > > performance impact > I don't believe that is an accurate summary. There were subtle issues > in the previous RFC that should have been addressed. Nikita Popov > wrote in https://news-web.php.net/php.internals/114239 > It would produce a better discussion if the RFC document either said > how those issues are resolved, or detail how they are still > limitations on the implementation. > To be clear, I don't fully understand all those issues myself (and I > have just enough knowledge to know to be scared to look at that part > of the engine) but my understanding is that the concerns are not about > just performance, they are deep concerns about the behaviour. Thank you for pointing this out. Nikita was referring to side-effects of capturing too much variables, and suggested to make the capture analysis behavior explicitly unspecified in the RFC so that it could be changed (optimized) later. The new version of the RFC does the optimization. Following your comment, I have clarified a few things in the "Auto-capture semantics" section. This includes a list of way in which these effects can be observed. These are really marginal cases that are not relevant for most programs. Cheers -- Arnaud Le Blanc