Re: [RFC] Static classes (Was Abstract final classes)
| From: | guilhermeblanco@gmail.com | Date: | Mon, 01 Dec 2014 22:33:15 +0000 |
| Subject: | Re: [RFC] Static classes (Was Abstract final classes) | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79361@lists.php.net to get a copy of this message | ||
PR with this feature request: https://github.com/php/php-src/pull/929
On Mon, Dec 1, 2014 at 4:56 PM, Rowan Collins <rowan.collins@gmail.com>
wrote:
> On 1 December 2014 20:30:46 GMT, Andrea Faulds <ajf@ajf.me> wrote:
> >
> > The problem is that, well, global state is rarely a good thing, I don’t
> think we should be encouraging it.
>
> To get a bit philosophical: Is it really the language's job to make that
> decision? Is there a difference between "encouraging", "allowing", and
> "enabling"?
>
> Purely static classes are a reality whether this feature is added or not.
> They do things namespaces can't (and probably shouldn't), but are simpler
> to work with than singletons (which they closely resemble) or full-blown
> Dependency Injection. Declaring a static class is just a way of
> acknowledging that this is a deliberate decision, and instance members
> should not be added.
>
> Regards,
> --
> Rowan Collins
> [IMSoP]
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Guilherme Blanco
MSN: guilhermeblanco@hotmail.com
GTalk: guilhermeblanco
Toronto - ON/Canada