Re: [RFC] Allow ::class on objects

From: Date: Thu, 09 Jan 2020 23:57:04 +0000
Subject: Re: [RFC] Allow ::class on objects
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-108086@lists.php.net to get a copy of this message
> On Jan 9, 2020, at 6:53 PM, Marcio Almada <marcio.web2@gmail.com> wrote: > > Because we would be expanding a construct that already looks > inappropriate from a purely > semantic POV with aliases that also would allow inappropriate usage > some_function::interface. > I'd rather have a generally unsatisfying construct than a set of > "denormalized" constructs with > equal potential for human inaccuracy. > > Perhaps the problem is that ::class was not exactly a good > language > design decision in the first place or maybe > it made more sense in the past and as the language evolved it started > to appear to be named poorly. > > A more _general_ construct like a nameof operator, as we have > in C#, > could have been a brighter idea. See: Okay, I get your perspective on this now. So let us add ::nameof and deprecate ::class, then? And apply it for all symbols? :-) -Mike

« previous php.internals (#108086) next »