Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113743 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 12120 invoked from network); 24 Mar 2021 17:19:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Mar 2021 17:19:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2B1091804D3 for ; Wed, 24 Mar 2021 10:15:18 -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 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 24 Mar 2021 10:15:17 -0700 (PDT) Received: by mail-vs1-f53.google.com with SMTP id 124so11736179vsg.12 for ; Wed, 24 Mar 2021 10:15:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0h3IKtq446YCwt/ok812yG+NvbNzX3cQ0NocdVW4bAs=; b=mpUSgM7Nvq72HF7M8Rho5dM4s9aIaS707rX1S3pGNzbTFVp79BZ8x1zoMNoOSpd9Ua fYKpfXJDSmTXhmos/JCSQMDEbrw7M0o6Roo1+XTHi4ga+IXVha23RWNXor6/RRv+sOM6 s3ZaXDuB0YhrNfq+Qn2HffTvnUfAxRQp9ntE3HtBVXHgmzdQIfZgDyZP+YyQ4CY+adIG CxX9InhwSbNPYqQFS2QZJXiPlFDrqveZa2mdjnZIijVHK6bg/sIS0kcXeYSAnm4izlIL NazBI/dYqgtmtlN29zSGtf6HT77OZKXpHX2b+hF1z3mg1crjCjWQmiDJarOTo0J92hf7 FlyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0h3IKtq446YCwt/ok812yG+NvbNzX3cQ0NocdVW4bAs=; b=kZmxSgsJ8KDvea97hMXqF/kvXUeXwx4arSn1DeydWWTCoS1RY1EClEiMOPV14igGim DAIJ5oawLE07sr2T+UryORecghbZsdv3Lxr9fqESlh7qzX+KllPmx610A/tZ0D2OSlyB 76wgmB0pXY99FBhswB3LQbRE0Bb6llYKYkprDEJWuxTW48JfhpoLTJqOesXCyv9NUjcU UlxLZEJL0vxo40mI7ozGvRTSxnN6MSkZSc+Bv97cDYlxuy5mJwmmN/OuQ4u7iT/RzppB MDQxHlWFUfNlknV/j5VnpTVrYKgGl2TsZkCaP+/L8XDpswhZAchRA0NAjj+B/5l5zjSF LfDA== X-Gm-Message-State: AOAM531JT+8FwkZkwodQuNmPLMeWvkzh8oEQtvleFD/WSVTJHKYrQVzw xY/rJH+qV+wOWYDiBxmIl250feAQkYWsMmvZiVo= X-Google-Smtp-Source: ABdhPJz6H/ilSyCBj/2Q8SCfzc9gk4fbNTNJt/3KO9ZzS7Bo2gF5x3c+xayL+yLhQaHB0Q6MhbK0qOseW/+zddnj2Sw= X-Received: by 2002:a05:6102:32d6:: with SMTP id o22mr2722870vss.44.1616606116533; Wed, 24 Mar 2021 10:15:16 -0700 (PDT) MIME-Version: 1.0 References: <88c9eb5f-f80c-4869-b7f8-1b58b9e2eaa3@www.fastmail.com> In-Reply-To: Date: Wed, 24 Mar 2021 13:15:05 -0400 Message-ID: To: Nikita Popov Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000051596405be4b7162" Subject: Re: [PHP-DEV] [RFC] Auto-capture multi-line closures and short functions take 2 From: chasepeeler@gmail.com (Chase Peeler) --00000000000051596405be4b7162 Content-Type: text/plain; charset="UTF-8" On Wed, Mar 24, 2021 at 1:02 PM Nikita Popov wrote: > On Wed, Mar 24, 2021 at 5:20 PM Larry Garfield > wrote: > > > Greetings, Internalians. > > > > Some months back I proposed an RFC for short functions. > > > > https://wiki.php.net/rfc/short-functions > > > > After some discussion, I put it on hold to ensure that it was compatible > > with the other discussion floating about around an alternate syntax for > > multi-line closures that did auto-capture. It's important that the > syntax > > of both proposals is consistent. > > > > Nuno Maduro and i have talked recently and worked out the syntax that is > > consistent between both proposals. That takes 'fn' off the table for > > short-functions, for reasons discussed in both RFCs. > > > > To that end, I offer: > > > > 1) The updated short-functions RFC: > > https://wiki.php.net/rfc/short-functions > > > > 2) A new RFC, code by Nuno, for auto-capturing multi-statement closures: > > https://wiki.php.net/rfc/auto-capture-closure > > > > These are separate RFCs and at this time we plan to send them to separate > > votes, but I list them together to demonstrate that they have been > > developed in a mutually-compatible way. > > > > Further details in the auto-capture-closure RFC. > > > > Could you please create two separate threads for these RFCs? > > Nikita > I guess my one question would be why we didn't support auto-capture when we first implemented anonymous functions, and if there was a reason, why does that no longer apply? -- Chase Peeler chasepeeler@gmail.com --00000000000051596405be4b7162--