Re: [VOTE] ::class feature to resolve namespaced class names to scalars
| From: | Marco Pivetta | Date: | Thu, 13 Sep 2012 14:02:16 +0000 |
| Subject: | Re: [VOTE] ::class feature to resolve namespaced class names to scalars | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62978@lists.php.net to get a copy of this message | ||
Hi JD,
On 13 September 2012 15:57, Jan Dolecek <juzna.cz@gmail.com> wrote:
> I'm not able to try it myself at the moment and it's not described in the
> RFC, so I'd like to ask:
>
> Will it invoke autoloading, if the class does not exist (yet)?
>
> I think this should be considered. If so, it's not good as it kills
> lazy-loading. If not so, it we may get errors later than expected.
> I think these problems deserve discussion. (I'd prefer to keep
> lazy-loading, since existence of class gets validated by IDE)
>
> Regards,
> JD
>
>
> On Tue, Sep 11, 2012 at 4:39 PM, Ralph Schindler
> <ralph@ralphschindler.com>wrote:
>
> > Hi internals!
> >
> > The ::class resolution proposal had significant discussion in April and
> > I've updated the patch to address issues that came up then. At this
> point,
> > I've gotten some positive feedback from various places and feel its time
> to
> > open it up for a vote to internals.
> >
> > RFC:
> > https://wiki.php.net/rfc/**class_name_scalars#vote<
> https://wiki.php.net/rfc/class_name_scalars#vote>
> >
> > PR: https://github.com/php/php-**src/pull/187<
> https://github.com/php/php-src/pull/187>
> >
> > Thanks,
> > Ralph
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
I don't think autoloading is needed here, since the FQCN can be resolved
without it (exactly like with type hinting).
Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com