Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114211 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 14602 invoked from network); 27 Apr 2021 18:39:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Apr 2021 18:39:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6F9D91804B5 for ; Tue, 27 Apr 2021 11:43:34 -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=0.4 required=5.0 tests=BAYES_20,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (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 ; Tue, 27 Apr 2021 11:43:33 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id A85AC5101324; Tue, 27 Apr 2021 18:43:27 +0000 (UTC) To: David Gebler Cc: Guilliam Xavier , Christian Schneider , PHP Internals References: <5b9f1500-615a-48f1-815f-1d48b327ef90@processus.org> <179049b1475.11134368b213512.254739612773841999@void.tn> <722ed544-69e3-3be4-f828-185914617228@processus.org> Message-ID: <818a7fa7-f76f-acb8-ef34-cabedc8c2ecc@processus.org> Date: Tue, 27 Apr 2021 20:43:27 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] [RFC][Draft] Sealed Classes From: pierre-php@processus.org (Pierre) Le 27/04/2021 à 19:51, David Gebler a écrit : >> I don't think at any moment that any of the >> people here really meant that, but it it's fundamentally what this >> argument does: it says that some conventions are by nature bad and the >> language should enforce people not to write code like this. > I think the language should not enforce any practice, convention or code The sealed feature does not enforce anything. It brings a new tool in already quite furnished toolbox. It doesn't force you to use it (and besides I think it's a good tool, but as I said, I can live without). >> Some conventions may or may not be bad by nature but that's not the >> argument I'm making, at all. The language enforcing one person's >> preferences over another's is exactly what you are advocating and I am >> cautioning against. It's not enforcing one person's preference over another's, people should be able to seal whatever they want to seal in their own code. I repeat, their code, not yours. If you don't like another person's code because you can't override a class, then fork it or use another library. And beside, I doubt that people will use it so widely that it'll prevent you from doing anything good. Or if they do so, they are probably not writing a so good piece of software (beware, subjectivity in the last sentence). By preventing so hard such feature to be included on this sole argument, you are actually dictating your own preference, not the other way around. I think that sealed class usage remains an edge case, and it's basically meant to avoid users to shooting themselves in the foot and open the discussion when they think it's not a good choice. >> I think this point/argument should be banned from this discussion. > Given the behaviour we're talking about is literally the change proposed in > the RFC, I find this a very strange take. I don't think it is, it's not how I understood it at the very least. Please don't take anything I said as being disrespectful (I'm not a native english speaker and sometime I do not measure my own words), on the contrary it's an interesting discussion. Regards, -- Pierre