> Using a :: pseudo-constant suffix rather than a ()-based construct would help 
> with the syntax clumsiness in both cases, but wouldn't entirely eliminate it. 
>  I don't have a really great answer here, unfortunately.  I think I'd 
> marginally prefer a ::name suffix at this point just for syntactic 
> convenience, but I'm still undecided if the overall tradeoff is worth it.  
> (For ::name, probably, as that would be a much lighter syntax impact for 
> those unusual cases that it's needed.)

I believe Lydia suggested something like that, and while I kinda liked
the syntax (better than nameof() for wordy-looking bits), it just
looked weird to me. I'm not dismissing it out of hand though. There
might even be some middle ground where nameof() only works on
functions/constants, while methods/properties have a ::name pseudo
constant. I'll have to play with it and how it feels.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to