Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114139 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35421 invoked from network); 24 Apr 2021 19:57:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Apr 2021 19:57:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3D6091804BD for ; Sat, 24 Apr 2021 13:01: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=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from darkcity.gna.ch (darkcity.gna.ch [195.49.47.11]) (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 ; Sat, 24 Apr 2021 13:01:33 -0700 (PDT) Received: from wafer.home (unknown [IPv6:2a02:1205:502d:fa80:fdc5:27e:96b0:978d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 280521517D6D for ; Sat, 24 Apr 2021 22:01:30 +0200 (CEST) Content-Type: multipart/alternative; boundary="Apple-Mail=_B561364D-B701-457A-8AE4-A1427A3F9CE3" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Date: Sat, 24 Apr 2021 22:01:30 +0200 References: <5b9f1500-615a-48f1-815f-1d48b327ef90@processus.org> <179049b1475.11134368b213512.254739612773841999@void.tn> To: PHP Internals In-Reply-To: Message-ID: X-Mailer: Apple Mail (2.3654.60.0.2.21) Subject: Re: [PHP-DEV] [RFC][Draft] Sealed Classes From: cschneid@cschneid.com (Christian Schneider) --Apple-Mail=_B561364D-B701-457A-8AE4-A1427A3F9CE3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Am 24.04.2021 um 21:51 schrieb Marco Pivetta : > On Sat, Apr 24, 2021, 21:44 Olle H=C3=A4rstedt > wrote: >=20 >> 2021-04-24 17:59 GMT+02:00, Saif Eddin Gmati : >>>> Doesn't this violate the principle: It should be possible to add = new >>>> features without touching old code? >>>=20 >>> This depends on which syntax is picked, both `for` and attribute = syntax >> will >>> be completely BC. >>=20 >> I'm not talking about BC, but the maintainability of the new feature >> itself. For the shape example, you'd need to edit the original file >> for each new shape you add, which is detrimental for maintainability >> and scalability. So what's a good use-case? I'm with Olle here: This sounds like an anti-pattern to me. The example could not be worse: Why should I not be allowed to add a = hexagon shape? > The main use-case of sealed types is being able to declare total = functions > around them. Could you elaborate on what's the real-world use-case for your main = use-case? This sounds like another case of a feature based in (math) theory which = leads to artificially locked down code. - Chris --Apple-Mail=_B561364D-B701-457A-8AE4-A1427A3F9CE3--