Re: Usable classes?

From: Date: Tue, 01 Apr 2025 20:03:16 +0000
Subject: Re: Usable classes?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-127018@lists.php.net to get a copy of this message
On 01/04/2025 11:09, Juris Evertovskis wrote:
## Part B. Usable classes Idea: allow using normal classes in the trait list.
Poking around in the archives, it seems there was a lot of discussion about what exactly "horizontal reuse" should look like before the current version of traits was added, way back in 2008. There were at least 4 RFCs drafted with different versions: - https://wiki.php.net/rfc/nonbreakabletraits - https://wiki.php.net/rfc/traits - https://wiki.php.net/rfc/mixin - https://wiki.php.net/rfc/horizontalreuse That last one, interestingly, has the implemented definition of traits, but also a declined feature of "grafts", which plugged whole classes together with slightly different semantics. You might be interested to skim through those, and some of the threads from the time (e.g. on https://externals.io) to see why they ended up how they did. -- Rowan Tommins [IMSoP]

« previous php.internals (#127018) next »