Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110229 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19145 invoked from network); 21 May 2020 07:28:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 May 2020 07:28:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1A7711804C2 for ; Wed, 20 May 2020 23:07:05 -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,FROM_EXCESS_BASE64, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS132203 203.205.194.0/23 X-Spam-Virus: No X-Envelope-From: Received: from smtpproxy21.qq.com (smtpbg702.qq.com [203.205.195.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 20 May 2020 23:07:03 -0700 (PDT) X-QQ-mid:Yeas4t1590041213t922t64863 Received: from 4B562073492C4058817F84E016DE3445 (me@jhdxr.com [116.14.113.108]) X-QQ-SSF:00100000000000F0FG1000000000000 To: "'Benjamin Eberlei'" , "'Ben Ramsey'" Cc: "'PHP Internals'" References: In-Reply-To: Date: Thu, 21 May 2020 14:06:51 +0800 Message-ID: <008c01d62f36$0621b4a0$12651de0$@jhdxr.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Content-Language: zh-cn Thread-Index: AQFDpK42Jgrcsz1NGTwd6vp0GapijwImH8U+AjttTBaptBVVUA== X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:jhdxr.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 Subject: RE: [PHP-DEV] [RFC] Amendments to Attributes From: me@jhdxr.com (=?utf-8?b?Q0hVIFpoYW93ZWk=?=) Hi Benjamin, It's good to hear that `PhpCompikerAttribute` can be merged, could you = include it in the RFC as well? Thus I think people who support = `UserlandAttribute` can agree with `Attribute` now as well. Regards, CHU Zhaowei -----Original Message----- From: Benjamin Eberlei =20 Sent: Thursday, May 21, 2020 6:13 AM To: Ben Ramsey Cc: PHP Internals Subject: Re: [PHP-DEV] [RFC] Amendments to Attributes On Wed, May 20, 2020 at 7:53 PM Ben Ramsey wrote: > > On May 20, 2020, at 12:07, Benjamin Eberlei = wrote: > > > > 2. Rename PhpAttribute to Attribute in global namespace (independent = > > of > the > > namespace RFC) > > > I suggested in a previous thread that we consider renaming=20 > `PhpAttribute` to `UserlandAttribute`, since this is the intent of the = > attribute, and it helps distinguish it from `CompilerAttribute`. > > I noticed that the compiler attribute is actually named=20 > `PhpCompilerAttribute`, so unless we change its name to=20 > `CompilerAttribute`, I don=E2=80=99t think it makes sense to change=20 > `PhpAttribute` to `Attribute`. Perhaps we change it to = `PhpUserlandAttribute`, for clarity? > Ah that's a good point that still needs to be clarified. We realized = that PhpAttribute and PhpCompilerAttribute should be merged, because the = difference doesn't make a difference to userland code and it complicates = things. For example enforcing that PhpCompilerAttribute is just on = internal classes would not work for generated stub code in Phan/Psalm = and so on that "describe" internal code by imitating it in userland. = This would not be allowed by the current implementation and lead to a = compiler error, lets say if we imitated Deprecated for documentation = purposes: > class Deprecated {} This file could not be compiled by current implementation as an error = would prevent Userland Deprecated class from using PhpCompilerAttribute. > > Cheers, > Ben >