Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118155 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87395 invoked from network); 1 Jul 2022 12:19:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jul 2022 12:19:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 78FE0180545 for ; Fri, 1 Jul 2022 07:11:41 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 ; Fri, 1 Jul 2022 07:11:41 -0700 (PDT) Received: by mail-ed1-f45.google.com with SMTP id o9so3090992edt.12 for ; Fri, 01 Jul 2022 07:11:40 -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=mKSsCbUi8tVpD4mQK5QnLAW7djIuWMQXQ67zCZAKYio=; b=MfY4RZDL0kBd00G9z+pU6Gn4rzwF3/PcMmSVoFl4Mo0Ef9Y49OX24rfMzxFAeQriJk J0TTeb+bbZBQKepvxotfU9YXvC9VPCDzFNBzH7B16pFy0qScGukeCQu+RSoOgoOEeZZX BOe2oEpDXa8sINHaO6D2WoRZR4UZmzHaYPgj2+3JpKSG54bdjnDZUohKnsb7JOyKP4C8 K70wOaKbRaKtxh5QLXN0y5mqNf316XKR4PBsjrFfS2Qjq0fscwyap8PfKHIqBHaIQwB3 HvdB2+56hx+7KS+oIGgUqW3WfjCL6utNrWlmn/Bk6avaRxqpRNzRKy8RMlBQZSt8IYW6 9uRA== 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=mKSsCbUi8tVpD4mQK5QnLAW7djIuWMQXQ67zCZAKYio=; b=GV51rvj3FtCNdadd07eeWVmxRFi7rsXkg5fSXLc/7Cv4GcKhDFyDiCLTgODzwZf60k GWSb2huE0W9FGtZrrqBOle3JThK95ZOOqsDiwyGKt8Qeg2uxpiBjchazf9EMHndwKgRt vHuTKhOb8v/HjeVRFcfSTMvtWZ7WufyULA+hehntS7aQOD59no06QJGth4gK5Jdjch8J xktVf7u/01Hx26SGvFIS+Ihv4e7XDe9Fm2+3uMTRruTp15jzoYIEr+OczT7SoXXzBhJV 82QuR6T5SUsKf6B98pErGaqripu6R4SL6rT4LQ2GaoOdkz73PBaX0Svlc62csuwN23fG neNA== X-Gm-Message-State: AJIora9+Oa+QzIoGAZfRkRgqbkv5GFL+dRlOndvDcaQqtMkfu+JOF+jE s3GV1ERbVhsE92ONsSffmy7YCMt2jbqWJXnNq/v6y8WM83M= X-Google-Smtp-Source: AGRyM1tww0kM3jwTixOj2ruc/leSWf4UyEKUAUrBbMMaojgWs68d2pPf7b3p4VQHPAk1Zts8YnSZmVvD8ns13EiZhe8= X-Received: by 2002:a50:a686:0:b0:437:d2b6:da7e with SMTP id e6-20020a50a686000000b00437d2b6da7emr19402801edc.121.1656684699765; Fri, 01 Jul 2022 07:11:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 1 Jul 2022 16:11:03 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="00000000000008ded605e2bef7f8" Subject: Re: [PHP-DEV] [RFC][Vote] Auto-capture closures From: divinity76@gmail.com (Hans Henrik Bergan) --00000000000008ded605e2bef7f8 Content-Type: text/plain; charset="UTF-8" >As far as we are aware, only two languages in widespread use require variables to be explicitly closed over: PHP and C++. All other major languages capture implicitly, as is proposed here. to be fair to c++, it supports [&] to capture everything, like int a=1,b=2,c=3;[&]()->void{std::cout << a << b << c;}(); 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 > > --00000000000008ded605e2bef7f8--