Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118176 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22466 invoked from network); 4 Jul 2022 08:12:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jul 2022 08:12:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 727471804F8 for ; Mon, 4 Jul 2022 03:05:12 -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,HTML_MESSAGE, 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-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) (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, 4 Jul 2022 03:05:12 -0700 (PDT) Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-31c8a1e9e33so24746977b3.5 for ; Mon, 04 Jul 2022 03:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nt0f0zfPifrjCxP/ZNpY3xs0Rd7hhovLsG66/e/iqVk=; b=cMK8GkbGC6dm5G90Z3w3+XVf/2mZ0AuAxE+bSMlpIXzzZ2FYodgrvRHR//rFu9R0eN 9i6MaLrZt7gPGCnmOlMvuciDrx8O/N8ilVOeiKkKm83cp+lHORhIeyjh/596tt5/xLMQ x27eCYSGDX19Ea07+txdocF0sHlTY6aHnJNhvsIQGMRGYGammy6dynE5kcLJWJc9fsDe My/dlX8+SiD+4yiXJQrQl7s9x+HetGDFmwrwj88xZzTwUfYzmewSk7Y3sKzGDC/0APAd R7/fRpTUhLE6fHQm+5QX8YY6S9OsUobEkqEpX5yfpeGAyJIlajxGOFUU8BZrAwnAAnAJ 5mLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nt0f0zfPifrjCxP/ZNpY3xs0Rd7hhovLsG66/e/iqVk=; b=LCgCwxIpLQ9BjRNpoBn4RTuup8Scs/5jJk6DcmO2HUj/gmXtayNUfpDhPXAh8BbvvS gEg3v8D/AQ/BvyRp+sqRd0YlrbSl9Im/ktYqbLbcSjvM2m+MS333guddUwTi90JhYDbm YFIn0TuV30VYkTG5VpykQxURBbLcg1HHSoxsL6zDCZBrH1whhzUARi6RNiKu/ozKu/T6 2lNxTY84a4eWJDwIoITTREVyl06QP9urRw6Tn+CSsOWYfuoqrJHG+Mep2nuPt4f30e9n GZBsy5DfDpTgYGyujPJSFwMc5AGoQvNeh+kHwMIf1mfXxCcBkKA+M/O/uJscWd6W7k7h nZxg== X-Gm-Message-State: AJIora8TOGgLkYunYwTcK0A99pTywT4MH0029aqKz46YIV10tJPkD2W0 IpfksahFfY2skbDGWFcKMO9m4UsfWJaB3+CWRWA= X-Google-Smtp-Source: AGRyM1uOY1v+614MWnpPaH6kJVOgICexVHo7GmE/iArJv0KD1yE2HXqr2piQSnqgdMcpw43GO/Fnp/0pJFm6BDrmQhw= X-Received: by 2002:a81:16c8:0:b0:31c:92dc:56dd with SMTP id 191-20020a8116c8000000b0031c92dc56ddmr6135362yww.295.1656929111347; Mon, 04 Jul 2022 03:05:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 4 Jul 2022 12:04:59 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000001994ca05e2f7dfe9" Subject: Re: [PHP-DEV] [RFC][Vote] Auto-capture closures From: ocramius@gmail.com (Marco Pivetta) --0000000000001994ca05e2f7dfe9 Content-Type: text/plain; charset="UTF-8" I ended up voting NO due to the fact that there is no mention of `$this` behavior changes ( https://externals.io/message/117888#117889 ) : I also disagree with NikiC's stance on this being the same construct as before ( https://externals.io/message/117888#117897 ), so I really wanted to get rid of this constant memleak risk that we have in closures. I should have made my stance stronger, instead of letting the discussion thread die, but time is what it is. The idea is interesting, but I'd rather keep using the old construct until the new one doesn't have the same pitfalls, and I'm fine with having to type more characters for the time being. The optimizations applied to the new proposal can probably be experimented on short closures meanwhile (for PHP 9.0, since there will certainly be the "edge of edgecases" somewhere), since there is hope for perf improvements there too. Unclear (to me) after looking at https://gist.github.com/arnaud-lb/d9adfbf786ce9e37c7157b0f9c8d8e13, is whether the optimizations are applied at compile time. It looks like the changes are inside the `Zend/Optimizer/`, and `zend_compile.c`, so perhaps the benchmarks are probably just worded in a confusing way. Important to note how `Zend/zend_compile.c` now depends on `Optimizer/`, which is a potential design issue. Greets, Marco Pivetta https://twitter.com/Ocramius https://ocramius.github.io/ On Fri, 1 Jul 2022 at 16:05, Larry Garfield wrote: > Greetings, Internalians. > > The vote for auto-capture closures is now open. It will run until 15 July. > > https://wiki.php.net/rfc/auto-capture-closure > > -- > Larry Garfield > larry@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --0000000000001994ca05e2f7dfe9--