Re: [RFC] Allow ::class on objects

From: Date: Fri, 10 Jan 2020 00:10:58 +0000
Subject: Re: [RFC] Allow ::class on objects
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-108087@lists.php.net to get a copy of this message
Em qui., 9 de jan. de 2020 às 20:57, Mike Schinkel <mike@newclarity.net> escreveu: > > > 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 It seems late to mess with ::class, maybe not for having nameof.

« previous php.internals (#108087) next »