Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120537 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88875 invoked from network); 6 Jun 2023 21:52:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jun 2023 21:52:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E6894180339 for ; Tue, 6 Jun 2023 14:52:10 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY, 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-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 ; Tue, 6 Jun 2023 14:52:10 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2b1a4250b07so77574281fa.3 for ; Tue, 06 Jun 2023 14:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686088328; x=1688680328; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=zM5uH5dtHcgm644PjseQVkqDadW9CJKz2DrJsbDC5qs=; b=fkvU9d6/GS+nPZU25xRHsckDhE5gYmujCJ3D72odXjPkRJZbwtMLhs3ANwUB7GtXNn GUs+C32wykhmpTczhPX15XgUaSWZTX+qVIOJOOUgSk+mQXCa16mYGQGfb7aQg0NAllXO lEfIVCYbNvC4o6Cakj/m+ER0ienLaZRZVvPhjT0srZJUtQ+qzgSiZ2fCaU3qsLbRbhET rqiRT+HuLJkEcDFXRcUQhREk4LikFM9oX8NNmIpFQEVLYhKoVjI9CCJivfabXxqLujut woho024gUQaeXifraiclS8J063grVLA0b8Lwsr57w15mGMbS1hDdhsqwyE10j3I9smJa 2J/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686088328; x=1688680328; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zM5uH5dtHcgm644PjseQVkqDadW9CJKz2DrJsbDC5qs=; b=P5KLEkq76qiOvjC7SBVqnlMI0VQsIt50bWWw2im2VCQ03icpImYO8WFiLuHdfe3Nto bQimOjza/9RkFllK2pfuFFyhn70eLHvfOiIIAi46DePBz0OHzFcBaxsq/kuPKC02ECpC 8MbJFwF5qzVOZtlM595D7eFX0XCFfaiEobAQhcGHX/QhkDAY+/Bo46Ps27TZWT1KNUd7 dNlNiQy2M2KDWFG7W+dBV5XQRQVRWmxtMxQWl084BhmYkpVgrUR7I3p58BOZWIiS6xmM enLiUOxByN8JTnQo7thnDy0SjLiCk00fqEsrIKQsZYfFMJp1cxzmy9Ai/KnxLgSAXKI7 Rnxg== X-Gm-Message-State: AC+VfDzi36HLjh36NIIqcjn3MWxDv+hwf8+cMNlOnndpeMkYSMJw+PIw W2DVelqb6meP8M0lS9S4CR00nCcdQ4mImhfZabFksAnY+gbGrQ== X-Google-Smtp-Source: ACHHUZ5HP5EA4JV8wNr5u62WOBSPTOD43JpVBNeIN+Bxj285a1q6gU0rNll8BQRnRr+BVbugzHmscD1sN5+TNPD49bU= X-Received: by 2002:a2e:86c8:0:b0:2b1:bd11:a71a with SMTP id n8-20020a2e86c8000000b002b1bd11a71amr1631776ljj.17.1686088328005; Tue, 06 Jun 2023 14:52:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 6 Jun 2023 18:51:31 -0300 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000d9cb2905fd7d0719" Subject: Re: [PHP-DEV] RFC [Discussion]: Closure self-reference From: ericklima.comp@gmail.com (Erick de Azevedo Lima) --000000000000d9cb2905fd7d0719 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello you all. As closures are objects, I'd be ok with $this->__invoke(), but it's not possible because closures can be bound to other contexts. From the proposed solutions, the one that makes more sense to me is the __CLOSURE__, because not only it does not need the boilerplate that can be confusing about the usage of "use/as" but it also shouts out for the ones reading the code that this function is calling itself. Best regards, Erick Em ter., 6 de jun. de 2023 =C3=A0s 11:26, Bruce Weirdan escreveu: > On Sat, Jun 3, 2023 at 9:11=E2=80=AFPM Dan Ackroyd wrote: > > I'm now opening the discussion for the Closure self-reference RFC: > > https://wiki.php.net/rfc/closure_self_reference > > Looking at the syntax options on the RFC page, the following > explanation is not clear to me: > > > * De-anonymize the function. This has a large aesthetic downside of > appearing to create the closure variable in the scope that the closure is > declared in, rather than internal to the closure scope. > > Does this mean that the variable wouldn't actually be created in the > enclosing scope, but someone may *think* it would? > > > -- > Best regards, > Bruce Weirdan mailto: > weirdan@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000d9cb2905fd7d0719--