Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110244 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53250 invoked from network); 22 May 2020 12:29:43 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 May 2020 12:29:43 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 20BDB1804F4 for ; Fri, 22 May 2020 04:08:54 -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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 04:08:53 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id z6so12085419ljm.13 for ; Fri, 22 May 2020 04:08:53 -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=lX718+0Chb9EuEJmZ0Tknz7xhCCpCtub9OOFcj0SrNY=; b=apQVcfJCQq3Ym+aXI37dhRNpLQ2U/6zPnCZDMdaH2hVSiATAH13WuFYR3afNRwDrAl qAlUCaBPryADh5iV99fseDyh0Wi0K83ITrVF+HGXFKPsAWP5Jo6/pUI7JEXCXgLfVvCf 7Dt3FBHZ5ip5PiJn2N1PW8DyQufPQBDe0QCOWESJcVEaQMkS08ThtivWN2jrcC1GrGPT /YkSIbaNm7hErEE8KRdqrgtwKVF1+9TkYyJHPAkUSkpES4utIzTb9I6Q04PVyS1PY10/ nxWksmXAEtb2mPywIk3/zOwc0NzuVZXbVNuuHmNTWgow5Nsrz1iwzLBVYmA9tAwqOc0Q BQXg== 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=lX718+0Chb9EuEJmZ0Tknz7xhCCpCtub9OOFcj0SrNY=; b=IPoSp9zt6nYegt/IXBb0D48A65+yAgKo1BqxOZBf0vcLheAs7yWc4MMv6aD4lsjQli doNd99+o/KjfOx1fRLJ2ByirbHR3aVRt5gXiwck6TjuS4WZzNAxHOVZbWIlQoJUBuq6e CA+40b3au/ubk0ZgHjr+E3e87gm7nULqozHjZb8aawVAnMaqa3dbIDbEifpnecLrHIhg zyHbzcdreZqXNQTS6eLBMJ2GiDkGLcQh3ZXktxbrGdqH6uU4LOxXUbQ7RDKL8w2xNV4w RS3EO04UjzG5ZehfLAGvdUEHqZiOs+0GWBkvIBxN7T32b/k0d0eZXGQMPdlC0Hzd+iZl D9Lg== X-Gm-Message-State: AOAM530cFLxNPrFt0usyBWiZ2Pip9swZYoz6qVnT1eoZxdI1knkjyHm1 Bf2tIS18Advzt5+VNlOxzNNZ5pvNUqWuY/Gu0b+ifbk1xi8= X-Google-Smtp-Source: ABdhPJxnYt/xPJHT6zJEJMqkyeyoA1DNzy9aGAdZ1/kd++W5eqZ49+p3+9Y3qp9lcoxmh+6QLR5lAEB1JQguBCfxuGI= X-Received: by 2002:a2e:9953:: with SMTP id r19mr5435988ljj.345.1590145730584; Fri, 22 May 2020 04:08:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 22 May 2020 13:08:34 +0200 Message-ID: To: Benjamin Eberlei Cc: PHP Internals Content-Type: multipart/alternative; boundary="00000000000069bf6905a63aa72f" Subject: Re: [PHP-DEV] [RFC] Amendments to Attributes From: nikita.ppv@gmail.com (Nikita Popov) --00000000000069bf6905a63aa72f Content-Type: text/plain; charset="UTF-8" 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). 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 > --00000000000069bf6905a63aa72f--