On Wed, 6 Jul 2022 at 16:17, Larry Garfield <la...@garfieldtech.com> wrote:

> On Wed, Jul 6, 2022, at 4:45 AM, Marco Pivetta wrote:
> > Hey Shinji,
> >
> > On Tue, 5 Jul 2022 at 23:39, shinji igarashi <s...@sj-i.dev> wrote:
> >
> >> Hello internals,
> >>
> >> I've started the vote for the Constants in Traits RFC:
> >> https://wiki.php.net/rfc/constants_in_traits
> >>
> >> The vote will end on 19. July 2022.
> >>
> >
> > I voted "NO" on this.
> >
> > Reasoning:
> >
> >  * traits are pretty much unnecessary in the language. Since their
> > introduction in PHP 5.4 their usage went from "let's try this out" to
> "how
> > do I burn this with fire?". I don't want traits to expand in scope: they
> > already do enough damage with their built-in accidental complexity.
>
> Point of order: This is a subjective position not universally held.
> Traits are certainly misusable, but so is literally everything.  If used
> judiciously, I have found them useful.  Certainly they are better than
> abstract classes in many cases.
>
> You may not like them, but that doesn't make them intrinsically harmful to
> the language by their existence.  They are not.
>

Certainly, but unnecessary features are bloat, and bloat is a clear
negative.
A feature's value must outweigh its carried maintenance and cognitive
effort in order to justify its existence.

As someone who worked a lot with analyzing traits (especially in reflection
context), traits don't respect that requirement, **BY FAR**.

Also, the idea of the RFC process here is that voters bring in their own
requirements: my requirement is as subjective as yours.

Greets,

Marco Pivetta

https://twitter.com/Ocramius

https://ocramius.github.io/

Reply via email to