Re: [RFC] Interface Default Methods

From: Date: Wed, 21 Jun 2023 03:46:08 +0000
Subject: Re: [RFC] Interface Default Methods
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-120651@lists.php.net to get a copy of this message
On Tue, Jun 20, 2023 at 6:29 AM David Gebler <davidgebler@gmail.com> wrote: > > On Tue, 20 Jun 2023, 04:10 Levi Morrison, <levim@php.net> wrote: > > > > I like the idea of this RFC - in fact it's one which has been near top of > > > my wishlist for PHP language features for a long time - but I think this > > is > > > an issue with the proposed implementation which at the very least > > warrants > > > highlighting and discussion. > > > > I understand your concern but personally believe it's overblown. This > > problem already exists with abstract classes, but doesn't seem to be > > that much of an issue in practice. I hope static analysis can fill the > > gap here, but don't think these checks are necessary to ship this > > feature. > > > > > Yeah I suppose I'm just saying "Interface default methods" can be > interpreted a few different ways and there's key differences between > Java-style, versus syntax sugar for mixing an interface and a trait in to > one unit, versus a user can effectively extend multiple abstract classes > but with interface keyword. I will update the RFC soon. In my head it was so obvious that it would be similar to regular inheritance and less like traits, to the extent I didn't even realize I'd need to specify it. This is why discussion periods can be valuable; the RFC doesn't always say what's in the RFC author's head :)

« previous php.internals (#120651) next »