Re: [VOTE] ::class feature to resolve namespaced class names to scalars

From: Date: Thu, 13 Sep 2012 21:01:11 +0000
Subject: Re: [VOTE] ::class feature to resolve namespaced class names to scalars
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-62987@lists.php.net to get a copy of this message
Perhaps get_class_fqn(string:ClassName) ?
Do you propose a function? Because I don't see how it can work as function - namespace resolution is compile-time.
I personally think we should keep resolutions as much to compile time as possible. Your suggestion implies that we now have either a function and a new keyword, or two new keywords: get_class_fqn, and ClassName. I like that ::class is basically 7 chars for a FQ name resolution at compile time, after all, point of this is that we can leverage namespacing in scalars/string when referring to classes as strings. -ralph

« previous php.internals (#62987) next »