Re: [RFC] Abstract final classes

From: Date: Thu, 27 Nov 2014 15:49:05 +0000
Subject: Re: [RFC] Abstract final classes
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-79235@lists.php.net to get a copy of this message
guilhermeblanco@gmail.com wrote on 27/11/2014 15:34:
This is true of classes intended to be static whether or not they are final. Allowing a "static class" would allow you to enforce that all methods (and properties) must be static without banning users from extending it (which is a completely orthogonal decision). So if I still want to not allow anyone to extend it, I would then have a final static class. Remember, I don't want people to change methods' visibility.
Yep, that's the idea. I see no reason, particularly with Late Static Binding, that it shouldn't be possible to have a static class which can be extended by a static sub-class, if that fits a particular use case.

« previous php.internals (#79235) next »