Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118175 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19864 invoked from network); 4 Jul 2022 07:54:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jul 2022 07:54:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EADE818054E for ; Mon, 4 Jul 2022 02:47:15 -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.2 required=5.0 tests=BAYES_40,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-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) (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 02:47:15 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id j7so9569284ybj.10 for ; Mon, 04 Jul 2022 02:47:15 -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=DKdsM3MGxSFQS5jQV83aGbonS+Sh416n1uz0Z6DDMcY=; b=Nrwje5RNbY4YZcPkNrEv4RpjvNq2mo/AvO40aC/GtawDdQvZoAAOifC+h1277hPSUh 72ZdLauhtro70yLuQSmCgqADKDrtmSymg7sOLnhsIn915y+kxLtd+KEjJzIZ/BL46pQX ytbiYDQ/I9l8MUNZhxINQVF1pSTjYBTZSe9SUThNCmWXnedf6SO5dBUxZ+1AU3aIIZU4 xANL4qH0sHHwDOFmecmB//I1cpKtBZrqZFCM7XBfMyYY5gN/8bF+gaJ4Ms1+UctOTSWV M5PK58c/2w4+5EerQy3sAbm2q0Bak0BonUZsWve41aS9rn4RLzXCkeUUBDrsDDdeDidI dpSw== 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=DKdsM3MGxSFQS5jQV83aGbonS+Sh416n1uz0Z6DDMcY=; b=d6La1wf7BKgEhXn9OGuXeLhph5MMwjbybnhaX8fHX7iPpNlvH/muooR+1mTnYJnWHO yhL8ZR7uGE4qsxDHr1bAM+NDrcA+GCxq4DV7wlys28FHUfnc0dnutiXbpvewKs0a0A2w ypI8uW0M8MQZ6m9lYzzdHPVVqQ5Os+bnrpzNVyYuT7U0cvQvSD6axlZKiRdQHLCxJHBs gGEDYF3eIpFN0DjSq7Fsxi/KwCdvf8mI1nW2KJEzQlqCeZaaflG49AI6e9OkZGkYR7K3 lb8VJAibU/lDBosZKqymkGithLX/U3pSNWwE5asHnEuqzGM1MVWkfCXbYfuGKoZtv248 4iYQ== X-Gm-Message-State: AJIora8ZfSwXLIrz0tDqUhcDIsLpOmqlqZAzGywW6NYuEFHlNksBatII 2b2l91kt9PcGkeGBPui25ZYIGNvEmVndI8yEQ8M= X-Google-Smtp-Source: AGRyM1shtr4GNs2TnAxkwK6mH8GlN4UVzFMkp12ZIPrMYIX9kbEyUdVeYA7tEupRgXoHanKxVxCXpGGWG8sKU6QTVhc= X-Received: by 2002:a5b:6c1:0:b0:669:a7c3:4c33 with SMTP id r1-20020a5b06c1000000b00669a7c34c33mr30138320ybq.543.1656928034753; Mon, 04 Jul 2022 02:47:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 4 Jul 2022 11:47:03 +0200 Message-ID: To: Larry Garfield , Arnaud Le Blanc Cc: php internals Content-Type: multipart/alternative; boundary="000000000000ee113e05e2f79e46" Subject: Re: [PHP-DEV] [RFC][Vote] Auto-capture closures From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000ee113e05e2f79e46 Content-Type: text/plain; charset="UTF-8" Hi there, 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 > Thanks for the RFC, I voted yes as I think the optimized auto-capturing logic is sound. Having "function()" still be a first-class citizen is also important to me as there are cases where one might prefer the explicit nature of capturing, so I join Rowan on this "rhetoric" topic. I'm just wondering if there could be a way to enable the auto-capture optimization for arrow functions. Having three kinds of rules for capturing feels too much, especially when there are that subtles for short closures. Maybe a deprecation could be possible for affected arrow functions? Nicolas --000000000000ee113e05e2f79e46--