Re: [VOTE] Interface Default Methods
| From: | Michał Marcin Brzuchalski | Date: | Mon, 03 Jul 2023 11:32:33 +0000 |
| Subject: | Re: [VOTE] Interface Default Methods | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120732@lists.php.net to get a copy of this message | ||
Hi Levi,
pon., 3 lip 2023 o 02:11 Levi Morrison <morrison.levi@gmail.com> napisał(a):
> 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 voted "yes", my personal use case waits for this feature. My use
case example:
https://gist.github.com/brzuchal/89e9481bbd34a6ce3d95a68eabff038b
With interface default methods I'd no longer need traits that implement a
single or in rare cases 2 methods that
use their respective methods returning objects and iterate in Generator
fashion over a paginated result set.
This is not an issue if there is one implementation of the interface but
when I decorate to apply some:
* caching
* logging
* failover
then the trait has to be attached to every class besides that it has to
exist which is an additional symbol here.
Cheers,
Michał Marcin Brzuchalski