Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117182 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97056 invoked from network); 1 Mar 2022 16:34:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Mar 2022 16:34:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 47EDE180507 for ; Tue, 1 Mar 2022 09:56:04 -0800 (PST) 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,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS62371 185.70.43.0/24 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) (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, 1 Mar 2022 09:56:03 -0800 (PST) Date: Tue, 01 Mar 2022 17:55:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1646157360; bh=0DG2ijSbBxav2HNfgNGsNIiQCIgZoONUfWcdxNKTsvE=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=NmbwUeA2TRGhI4QbDAFG29PcBeS0l9jXFX8hTR/5PM7xK3rWDaLJq1Xpx2BStMPv1 BiIidLa5qnLOtBCw0BN2mQNKXhNq/rL6nnycihRvwSVoaBe4eyBJ4SOC5OBRdXQr7n WjVF7voFMpJ81mlIJLdJ8QkLEl1MBO2c9G2gVwOPFfoDMrsfqtmjb5iVGzoLfU2NVB OPyfaEaRSRMFsIr7Vgeg1toDCW7tiqInR5akYgo3np5OsFVNrj5jJggtFqDEe/Cjh1 nNo9/tzl+B99jPNBtJ/cLEA+vvLO6aUzDOgfTNOPaciPCY6+q/d9tRmCXRc53JVUEO 0OayGCkRz2WdQ== To: Larry Garfield Cc: php internals Reply-To: Saif Eddin Gmati Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha256; boundary="------73039005028a94776019e4696f30bc31a28fad557e9230b9415f3fc126d7f126"; charset=utf-8 Subject: Re: [PHP-DEV] [RFC] [Under Discussion] Sealed Classes From: azjezz@protonmail.com (Saif Eddin Gmati) --------73039005028a94776019e4696f30bc31a28fad557e9230b9415f3fc126d7f126 Content-Type: multipart/mixed;boundary=---------------------4e2570445c135f796f87cb85ca51a151 -----------------------4e2570445c135f796f87cb85ca51a151 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 On Tuesday, March 1st, 2022 at 6:24 PM, Larry Garfield wrote: > On Mon, Feb 28, 2022, at 9:49 PM, Saif Eddin Gmati wrote: > = > > Hello internals, > > = > > Following up on last years email, I have decided to move along with th= e > > = > > Sealed classes RFC after some changes, and put it up for discussion. > > = > > Previous discussion: https://externals.io/message/114116 > > = > > RFC: https://wiki.php.net/rfc/sealed_classes > = > Why not "final ... permits" or "final ... for" as options? Effectively w= hat is created here is a final class/classic-thing, but with holes in it. = Otherwise, there become questions about why final and sealed have differen= t keywords when they're such similar things. > = > --Larry Garfield > = > -- > = > PHP Internals - PHP Runtime Development Mailing List > = > To unsubscribe, visit: https://www.php.net/unsub.php I personally see `sealed` and `final` as completely different flags. one ( `final` ) declares a type as final, therefore, no sub-type can exist= at runtime. = while the other ( `sealed` ) declares a type as non-final, with known, lim= ited set of sub-types. another things to note, is that `final` modifier is currently not supporte= d on traits, and interfaces, and while we could add this, it still feels "= wrong" when you see `final interface FooInterface ..` at first glance, mak= ing it harder to read the code. However, i see why people might prefer this option, so if enough people re= quest this, i will add it as a syntax option. Cheers, Saif. -----------------------4e2570445c135f796f87cb85ca51a151-- --------73039005028a94776019e4696f30bc31a28fad557e9230b9415f3fc126d7f126 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wsFzBAEBCAAGBQJiHl4UACEJELAOCkaz8cFXFiEEOazMpP0wDQTIQG6zsA4K RrPxwVcFVxAAq8HjSwoz9/o1I3TO5JrNh+q6zoRVDV1ZbqcDfSAs+8qCaD9+ azzMadfZ1OGSPoP/fUaz5G6ItLAbsoSa8OUSmPT2O7592b/oPog6wTS45PTf 4miKwbNuSJpaElxZjWzdap3KruxuQUvLhRY3m4W07i3Vs7R66CkSQCClfwmK GzUqMBJYRMddJRwlS6yncuth/lhgOA7rigN7HdILkVxnTsZUCRskeLF0Yvtl sqBkQvAWURnAu5m0QGIctCqhwpXpu9OyHyGf1PGwwuZLuluwyVdnnFXjQyU9 Ati9mqwggW15rRiFBUkX5Z8UOSSSXprmH1yAVsdUv6S1oxfflMCy09hnpFl/ EtWLh5RMjrTtwyzgpJKXUEJoXcKfdHwi3K+kd8M/z14FOgTO5zdjXCmy4sd8 3xRFPprezXM93IwDf/JNvjhv0axWXWaThtg6J1a3yfqZ6agha5TEDsvmgI7G UasSewQ5YdmRThLk30wcYqnKU6gdPFFyxtBwrahx+YVkd+9wyyEC0HioQ+8n o7PqTQC8jMUnJixtvee4r4iJoUC4kNukyfdi3nD7pP+RwCuOX9V0ShaoydFp J1iFpgzH5yXCqDneU1P8XZ+4jaXk9UaXmu3eMsRlM3SbOOGxC4jk4Q938B7p lWrgZSYZJVtxhaG9yd14o5E7uux8oJz35+0= =L0Ah -----END PGP SIGNATURE----- --------73039005028a94776019e4696f30bc31a28fad557e9230b9415f3fc126d7f126--