Re: [VOTE] Interface Default Methods

From: Date: Tue, 11 Jul 2023 20:11:18 +0000
Subject: Re: [VOTE] Interface Default Methods
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-120784@lists.php.net to get a copy of this message
On Jul 11, 2023, at 12:03, Peter Kokot <petk@php.net> wrote: > I really liked this idea actually but I'm still not so sure about it, > what would be the "right" approach. So, here's a crazy thought: why do inheritance, interfaces, and traits need to be separate at all? At some level, they're all ways of composing a class with different restrictions, e.g. inheritance requires a single parent, interfaces must be abstract, traits don't interact with typing, etc. This RFC was an attempt to lift some (but not all) of these restrictions on interfaces; in that sense, it almost seems like too small of a step, and one which leaves the language in a confusing intermediate state.

« previous php.internals (#120784) next »