On 1 December 2014 20:30:46 GMT, Andrea Faulds <a...@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

Reply via email to