Re: [RFC][Under discussion] Fetch properties in const expressions

From: Date: Fri, 24 Jun 2022 16:43:32 +0000
Subject: Re: [RFC][Under discussion] Fetch properties in const expressions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-118092@lists.php.net to get a copy of this message
> > Hi everyone > > > > I'd like to start a discussion on a simple RFC to allow fetching > > properties in constant expressions. > > > > https://wiki.php.net/rfc/fetch_property_in_const_expressions > > > > The RFC proposes adding support for fetching properties in constant > > expressions using the -> operator. I'm looking forward to your > > feedback. > > > > Regards, > > Ilija > > The enum-in-attribute use case came up recently in Symfony. I'm in favor > and the RFC looks good to me. > Genuine question: In the thread about auto-implementing Stringable for string backed enums, there is extensive argumentation to explain why ppl that use enums this way are wrong. You mentioned writing a blog post about these reasons Larry, and Benjamin (/cc) also expressed a similar opinion. So my question is: don't these arguments apply here also? Shouldn't we reject this RFC and tell ppl to use consts instead? If not, why? Nicolas

« previous php.internals (#118092) next »