Re: Static class
| From: | Mike Schinkel | Date: | Mon, 17 Jun 2024 14:41:54 +0000 |
| Subject: | Re: Static class | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123648@lists.php.net to get a copy of this message | ||
> On Jun 17, 2024, at 8:54 AM, Bilge <bilge@scriptfusion.com> wrote:
> Furthermore, for absolute clarity and the avoidance of doubt, I believe this guiding principle
> can be enshrined on the following single sentence:
>
> "We cannot remove features from a static class that would otherwise be present in a
> standard class."
>
> I believe following this principle we will arrive at the best implementation of static classes
>
A great principle, yes, but needing a small caveat:
"...excepting features that by-nature are not relevant to the static class use-case, such as
instance-based magic methods like
__get(), __set() and
__construct()`."
That might have been implied, but good to make it explicit.
-Mike