On Thu, Dec 29, 2016 at 3:27 PM, Mathieu Rochette <math...@rochette.cc>
wrote:

> yeah it's mostly syntactic sugar, I think it would encourage developer to
> use this pattern instead of inheritance when appropriate.
> I also think that most of the time using the decorator pattern helps
> following the single responsibility principle
>

Meh, just `final` as much as possible, combined with interfaces :-)


> also, this would add one more benefit : methods that are not override
> could probably be optimized by the PHP engine (avoid one userland proxy
> call)
>

That's probably something that opcache could do anyway.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

Reply via email to