Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109928 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19627 invoked from network); 29 Apr 2020 16:08:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Apr 2020 16:08:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 717B6180544 for ; Wed, 29 Apr 2020 07:41:42 -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-vs1-f43.google.com (mail-vs1-f43.google.com [209.85.217.43]) (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, 29 Apr 2020 07:41:42 -0700 (PDT) Received: by mail-vs1-f43.google.com with SMTP id 1so1519488vsl.9 for ; Wed, 29 Apr 2020 07:41:42 -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=NJi+r3oqzvLNvK0iWgoZz9hOVHjZaQW+IMqFRCDJdpQ=; b=IC69JbIKXKVvn1E8KPCNaW72Xzt+IMBNejIH2Yv4sanEpeCTRl3WFAOPycghzp2sqA 1bi3cSXllO3e4d6bY2NuYCXUAjzF3EghT/6VFBDIJdBP3lqXI6ii43yrvkPyLvll7x5v x8prXHXhOSIx9D8Lz+Qb6rxljKr3NSMQfRBjvO9bYDZ0FPWY+BGL2KG/PFtqt8mjBmNy g2D6j5HZEII/fzHOOs7y/5jVLtcA2Jt2jf5iEYNTwV60LRSuplj4gkUxsC/1UDsGKAeB KYoriAxFkxOq2tP+3+cD6bwjrg183bylzEUckU8Qkq8+I6m3wujkQGhPoMxwcUfB3gp6 a41A== 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=NJi+r3oqzvLNvK0iWgoZz9hOVHjZaQW+IMqFRCDJdpQ=; b=Pnhu91+kLaYm+JPXuc3jVrK0YYGu5bmlo3jWurh31tMBEhgYpjYt7h7gTAjLFS45EX gF2CTRR4rTKQBOF/jmkCFuc9lFlap7Yh09fEPjvAnhUWJD+QB6zHF+GhviQbG54V2ieS SREKyaTRZG/H/gWQcME3jlnQwd/UdAibs2VxFHzHJ6Qf4btt5G9ZLm8OaRoBncROjzHZ gLCwKrXahdSnhzqLrGiZoOe08Q9TVB4jlgTI04N/qQQy48mUB4Jsvj4ub47Uapdjk4qb z62FvqMG9jAYRQ6gLZ3gk98xFJb8bN9gRrXFnnsBXmPjR1fkxQLUOQ62pg/LJjl9Y93K VdRQ== X-Gm-Message-State: AGi0PuYxPokHaEiMQjWFwtmG/v2VibIKzhcStvqO3MqsQIgUKUzIu4M7 DDxVmiocynm2IIDivOCiEkeVWe+0SwDACpZcEPo= X-Google-Smtp-Source: APiQypJqAZAcknb1GK5SShCFmxmW78g15SeqQYnC2iYoLHYiHPuSq8pWJYtyA0UvEpX3EnAaqTbemOpDAZbLEDo8MFs= X-Received: by 2002:a67:e9d9:: with SMTP id q25mr24909278vso.27.1588171300547; Wed, 29 Apr 2020 07:41:40 -0700 (PDT) MIME-Version: 1.0 References: <4063585.LhOdPkFbeG@mcmic-probook> In-Reply-To: Date: Wed, 29 Apr 2020 10:41:29 -0400 Message-ID: To: Benas IML Cc: =?UTF-8?Q?C=C3=B4me_Chilliet?= , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000362edf05a46ef2ef" Subject: Re: [PHP-DEV] Renaming PhpAttribute to Attribute From: chasepeeler@gmail.com (Chase Peeler) --000000000000362edf05a46ef2ef Content-Type: text/plain; charset="UTF-8" On Wed, Apr 29, 2020 at 9:35 AM Benas IML wrote: > Hello, > > I honestly don't care what it's called, but I am seeing some arguments being used in favor of changing it that I think are invalid. > Since your project is just a single example, we still can't make such a > bold > claim that `\Attribute` is used a lot. > > As with any possible BC break, the issue isn't what we know, but what we don't know. It's the potential impact to closed source or other proprietary projects out there, weighed against the benefit. Since "Attribute" is a pretty common term in programming, the odds of some of those projects having an Attribute class in the global namespace is higher than some esoteric term rarely used in a programming context. > While "attribute" is a fairly generic word, just about everyone uses > namespaced > classes and therefore it's not a huge problem. Moreover, PHP 8 is a major > release so BC in such cases isn't the first priority. > > Again, your assumption that just about everyone uses namespaced classes doesn't take into account closed source projects. I don't care if it's a major release or not - BC breaks should always be avoided without a major benefit > Also, it's important to mention that the introduction of functions such as > `str_contains()` is also a breaking change for some. But the benefits it > provides outweigh the 0.1% who may get BC issues. > > str_contains adds functionality to PHP. We aren't debating whether to add attribute functionality to PHP, but what to call it. As such, this argument is an invalid comparison. > Best regards, > Benas Seliuginas > I don't think PhpAttribute is a bad name. Per the RFC: "Attributes as a form of structured, syntactic metadata to declarations of classes, properties, functions, methods, parameters and constants. Attributes allow to define configuration directives directly embedded with the declaration of that code." - In other words, they are Attributes of PHP constructs. While that additional Php might not be necessary to avoid ambiguation in the same way it was for Token, I don't think it's an improper disambiguation either. As Derick said below "PHP owns the top-level namespace but tries to find decent descriptive names and avoid any obvious clashes." - These seems like a prime example of using "descriptive names" to "avoid any obvious clashes" As I said above, I'm ambivalent about this particular issue. However, I get nervous when I start to see the "Who cares if it breaks stuff" or "Well, they shouldn't be doing it that way, so screw them" arguments pop up. While the chances of a BC break might be minimal using "Attribute" - I don't think that PhpAttribute is an undue burden in an attempt to avoid such instances, nor is it logically inconsistent with other Php* named classes. -- Chase Peeler chasepeeler@gmail.com --000000000000362edf05a46ef2ef--