Re: [RFC] [Discussion] nameof

From: Date: Sat, 13 May 2023 13:10:29 +0000
Subject: Re: [RFC] [Discussion] nameof
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-120260@lists.php.net to get a copy of this message
On Sat, 13 May 2023 at 08:27, Robert Landers <landers.robert@gmail.com> wrote: > > Hello Internals, > > It is with much trepidation and excitement that I'd like to announce > the nameof RFC (https://wiki.php.net/rfc/nameof). Can you provide more details on what the error conditions are? I can see 'non-existent static variable' and 'non-existent variable', are there others? > An exception model was considered, however, the author believes that > it would break the concept of “using nameof wherever a string could > be used” and wouldn't be practical for the engine to handle all of > those cases. Can you put some detail in there ....I don't understand the problem, or what you mean by it not being practical to 'handle all of those cases' . > each one has its own merits but ultimately will > be left up as a secondary vote: One of the reasons the RFC process has served PHP pretty well is that it forces people to think through the details. I really don't think putting a few options up and hoping that people choose the best one is a good way to design a language; it allows skipping over thinking the details through. And yeah....this is one of the reason doing RFCs is annoying. People are often persnickety over details. cheers Dan Ack

« previous php.internals (#120260) next »