Thinking about it... in #PHP, why are
traits even different things?
Everything you can do with an
This is functionally the same as defining an
abstract public function in a trait.
This is functionally the same as a trait
use-ing another trait.
This is functionally the same as
use-ing a trait that consists entirely of abstract public functions.
This is the one thing a trait cannot do -- but I don't understand why it was done that way.
Note: this seems related to my trait implements wishlist item from earlier. At first I thought that they might be in conflict, but on looking at the syntax in more depth, I don't see how. A trait that uses/extends another trait is also declaring abstract functions in that trait as an implementation requirement.
Putting both of these suggestions together would both simplify the language and make it more powerful, I'd think.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!