Re: [RFC][Draft] Sealed Classes

From: Date: Mon, 26 Apr 2021 07:22:00 +0000
Subject: Re: [RFC][Draft] Sealed Classes
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-114176@lists.php.net to get a copy of this message
Le 25/04/2021 à 21:22, Larry Garfield a écrit :
Stitching together 2 replies to minimize thread noise... On Sun, Apr 25, 2021, at 11:58 AM, Michał Marcin Brzuchalski wrote:
Speaking of Attributes I prefer not to use an Attribute for any particular language feature which expects input arguments to be a valid class or interface name for two reasons: first because there is no effective way to restrict input string to be a valid class or interface name and second that it'd require passing strings which means in most cases passing class or interface name with magic ::class constant read. Cheers, Michał Marcin Brzuchalski
That's actually a pretty solid argument against attributes here, honestly. Consider me convinced, and now in favor of "final class Foo permits Bar, Baz". :-) Yes, even though I was the first mail suggesting it in the beginning, this is a solid argument which actually do change my mind.
In the end, I like the class Foo permis Bar, Baz syntax, with a single keyword added. -- Pierre

« previous php.internals (#114176) next »