Hi Andreas, pon., 3 lip 2023 o 06:33 Andreas Heigl <andr...@heigl.org> napisał(a):
> Am 03.07.23 um 02:11 schrieb Levi Morrison: > > Chatter on the [Interface Default Methods RFC][1] has been quiet for > > the past 6 days, and the feature freeze deadline is fast approaching > > for PHP 8.3, so I'm moving this to vote. It'll be open for two weeks > > as usual. > > > > Thanks to everyone who discussed weaknesses in the RFC during the > > discussion phase. > > > > [1]: https://wiki.php.net/rfc/interface-default-methods > > > I've voted "no" on this RFC for one simple reason: > > For me an interface is about the abstraction of a contract. It defines > how different parts of code interact with one another without having to > know about the implementation. > > With this RFC we are adding implementation details to the abstraction. > > That requires knowledge about the implementation of different parts of > the code. Which we do not have when defining an interface. I disagree, look at the example I presented in my other response, one method can use another to provide a default method which you'd be including via trait in every implementing class because as it only uses another interface method. This means that you don't need to know anything about the implementation itself at all. You're free to use other interface methods and don't need any properties or implementation details. Cheers, Michał Marcin Brzuchalski