Re: [RFC][Draft] Sealed Classes

From: Date: Sat, 24 Apr 2021 15:52:20 +0000
Subject: Re: [RFC][Draft] Sealed Classes
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-114127@lists.php.net to get a copy of this message
2021-04-24 12:56 GMT, Pierre <pierre-php@processus.org>: > Le 24/04/2021 à 12:55, Saif Eddin Gmati a écrit : >> Hello Internals, >> >> I'm sending this email to open discussion about sealed classes, >> interfaces, and traits feature for PHP 8.1. >> >> I have create a Draft RFC here: >> https://wiki.php.net/rfc/sealed_classes >> <https://wiki.php.net/rfc/sealed_classes> >> >> A major concern for few people have been the syntax, in which it >> introduces 2 new keywords into the languages, therefor, i have added a >> section about alternative syntax which could be used to avoid this >> problem. >> >> Regards, >> >> Saif. 1) Doesn't this violate the principle: It should be possible to add new features without touching old code? 2) Isn't namespace-internal access a better feature for the same purpose? That is, only allows a class to be extended within the same namespace. Olle

« previous php.internals (#114127) next »