Re: [VOTE] Interface Default Methods
| From: | Ben Ramsey | Date: | Mon, 03 Jul 2023 03:01:19 +0000 |
| Subject: | Re: [VOTE] Interface Default Methods | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120729@lists.php.net to get a copy of this message | ||
> On Jul 2, 2023, at 21:43, Levi Morrison <morrison.levi@gmail.com> wrote:
>
> On Sun, Jul 2, 2023 at 7:08 PM Ben Ramsey <ben@benramsey.com> wrote:
>>
>> I’m probably going to vote “yes” on this, but since the property accessors RFC
>> won’t be ready for 8.3,[1] and that RFC covers use of properties in interfaces, how useful will
>> interface default methods be without interface properties?
>
> Plenty useful, I think. Interfaces deal with abstractions, so there
> are often things you can do without having state. Java's interfaces
> don't allow properties, for instance, and they still have this
> feature.
>
> As an example, this poor-man Sequence interface works, because the
> behavior and state for
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc
next is provided by the implementer:
>
Thanks for the response. This makes perfect sense to me now.
Cheers,
Ben
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc