Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110248 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20133 invoked from network); 22 May 2020 16:50:48 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 May 2020 16:50:48 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0729218054D for ; Fri, 22 May 2020 08:30:00 -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,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE 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-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 ; Fri, 22 May 2020 08:29:59 -0700 (PDT) Received: by mail-wm1-f41.google.com with SMTP id u13so278835wml.1 for ; Fri, 22 May 2020 08:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t8j5Cc4zFU0OYS1ukxEmKopB4dWexLN8DVStmpRDDec=; b=tEX4NCUjzRKhbnjELjF8bZOs2J6hzqSp3Zl6z4tFIZAbn+dmEaWUFDVRuX4LcgaSGr 2pjaqJMGDbJk9pq63YsHNUVf26Hyy6nAUSiMf90J46VsXCbcXNfP42YHqtFFtUpBHayx Buav6dTdIetOYPfbcG8qMJGL7Sts0W9vb1GP4nlAwp6gIU5EtKEDhWw6Lmo9COJuo1Nd 6J9Qe37Ri09kbXPuI0k65uKdC6b5fyyg1Jk/bBlI+jIh5TBcqNIG2dXkZ87+uwf1GCUO 9Mx5Hg8O3VjL8aGqm93Fbqp2PoBFCfUWepnnn5+3UtJdoi6AWDaFxp7FRjLTS06WfP1i xJvg== 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=t8j5Cc4zFU0OYS1ukxEmKopB4dWexLN8DVStmpRDDec=; b=Zb23truzhQJFYYA0sdsr3DuD7Zltcoxf/LI9mwn73GbBtCfBBYZz5YJdBnDkRqa2CM rHXWS5MYFaI2yZFbVTMblcAIY9dkIdgQ2NR3ywwtJ93WDpanW4L1G0qedLwSlkPSO92E NlOxpRgLxv3yS1yrRKLWn1kreZfjl48rVHjALVC+QMWuWvXMuKllR5JyQqzsqYo2LaSI YPIePSplwNo2mEsvr/0E2fQRn/lQZUjttjiu+k7VkHE+aoSBEVMoKom/mDzDIzbuDrOk 0RyNR16jr2inXpu5paYeb6+ES4luMd/bhLX/ZusrEtEH9TLNksu+a8ug0jdWhoUtR+05 5kJA== X-Gm-Message-State: AOAM530Fdu3muWWQHlf53wymJpzrNXGcE0KiuVdxOrIzi7YHpQb32oOC xTiRx9ODJ2SaOWBP+d/jSeDx6wNozPUVTK09oXFSNPDbIS4+pg== X-Google-Smtp-Source: ABdhPJx6T/6n76HratCx4Uh6oGRrWb2MbuUc8dMWjujL1iE0glMKFH3XGj13Z17N2DKm2S7QmaIcfdA6sy41BxFyYsI= X-Received: by 2002:a7b:cfc9:: with SMTP id f9mr13674564wmm.107.1590161397980; Fri, 22 May 2020 08:29:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 22 May 2020 17:29:46 +0200 Message-ID: To: Nikita Popov Cc: PHP Internals Content-Type: multipart/alternative; boundary="00000000000043313905a63e4d40" Subject: Re: [PHP-DEV] [RFC] Amendments to Attributes From: kontakt@beberlei.de (Benjamin Eberlei) --00000000000043313905a63e4d40 Content-Type: text/plain; charset="UTF-8" On Fri, May 22, 2020 at 1:08 PM Nikita Popov wrote: > On Wed, May 20, 2020 at 7:08 PM Benjamin Eberlei > wrote: > >> Hi everyone, >> >> the Attributes RFC was rather large already, so a few things were left >> open >> or discussions during the vote have made us rethink a things. >> >> https://wiki.php.net/rfc/attribute_amendments >> >> These points are handled by the Amendments RFC to Attributes: >> >> 1. Proposing to add a grouped syntax < > > 2. Rename PhpAttribute to Attribute in global namespace (independent of the >> namespace RFC) >> > > As was mentioned in one of the previous discussions, we expect that PHP is > going to ship more language-provided attributes in the future. With this > proposal we have the "Attribute" attribute, but I expect we'll at least > have "Deprecated" as well, and probably also something along the lines of > "Jit" or "NoJit". While I'm happy with "Attribute" living in the global > namespace, I don't really think we'd want to introduce "Jit" as a class in > the global namespace. The name is simply to generic and does not indicate > that this is part of the attribute system. We'd be forced to go with things > like DeprecatedAttribute or JitAttribute, which seems rather non-optimal to > me, as we're just reinventing namespaces to avoid using them... > > As such, I would suggest to introduce a common namespace for all > attributes provided by PHP. This means we'd have Attributes\Attribute, > Attributes\Deprecated, Attributes\Jit, Attributes\NoJit etc. (I'm also okay > with the PHP\Attributes\Deprecated variant, but that's a separate question). > Deprecated would be an "engine level" feature, but Opcache is an extension, so it can have its own namespace "Opcache\Jit". The namespace RFC goes that far mentioning only " core symbols which cannot be unbundled" should go into a PHP namespace, which would exclude Opcache (and its "sub-extension" JIT). https://wiki.php.net/rfc/php-namespace-in-core So for me that is not necessarily an argument against Attribute in global NS, because Jit would live in Opcache\. > > Nikita > > 3. Add validation of attribute class targets, which internal attributes can >> do, but userland can't >> 4. Specification if an attribute is repeatable or not on the same >> declaration and fail otherwise. >> >> Each of them is a rather small issue, so I hope its ok to aggregate all >> four of them in a single RFC. Please let me know if it's not. >> >> greetings >> Benjamin >> > --00000000000043313905a63e4d40--