Re: Singletons
| From: | Rowan Collins | Date: | Wed, 05 Feb 2014 14:58:21 +0000 |
| Subject: | Re: Singletons | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72278@lists.php.net to get a copy of this message | ||
Ralf Lang wrote (on 05/02/2014):
Yes, I used them (and ArrayObject) on some occassions. I see no conflict between having them in core and FIG agreeing on their usage or something different.ArrayObject includes actual implementation, and the interfaces it implements activate special behaviour in the core. SplObserver and SplSubject appear, unless I'm much mistaken, are equivalent to about 4 lines of userland PHP each defining 2 very simple interfaces. That's exactly the kind of thing FIG is working on, e.g. a Logger interface. I can't think of any reason, now that FIG and Composer exist, that those interfaces would need to be compiled into a PHP extension. Not that I'd argue for their removal, now they do exist, but I see them as an old experiment in pushing coding standards using the core of PHP, and not a useful model for anything new. -- Rowan Collins [IMSoP]