Re: [RFC] Anonymous Classes
| From: | Marcio Almada | Date: | Sat, 07 Mar 2015 16:35:34 +0000 |
| Subject: | Re: [RFC] Anonymous Classes | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-84405@lists.php.net to get a copy of this message | ||
Hi,
2015-03-07 8:28 GMT-03:00 Robert Stoll <php@tutteli.ch>:
>
> > -----Ursprüngliche Nachricht-----
> > Von: Patrick Schaaf [mailto:php@bof.de]
> > Gesendet: Samstag, 7. März 2015 08:22
> > An: Philip Sturgeon
> > Cc: internals; Robert Stoll
> > Betreff: Re: [PHP-DEV] [RFC] Anonymous Classes
> >
> > Am 06.03.2015 20:14 schrieb "Philip Sturgeon" <pjsturgeon@gmail.com>:
> > >
> > > Right, this here RFC has been drastically improved.
> > >
> > > https://wiki.php.net/rfc/anonymous_classes
> > >
> > > Anyone got any doubts or troubles at this point?
> >
> > Can we / could we do "extends self", "extends static", or even
> > "extends
> $someclassname" ?
> >
> > The first two could be handy in factory like object methods, and the
> last one generally in factory methods.
> >
> > best regards
> > Patrick
>
> Personally, I would go step by step. First introduce anonymous classes and
> then extend it with features like the one described above - should be less
> controversial.
> The last construct idea described by you would introduce dynamic
> inheritance to a certain degree and I am not so sure if that is really a
> good idea
>
> Cheers,
> Robert
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
That's not controversial, it seems like a basic feature we should have. As
anonymous classes is a major feature, adding "extends self" and "extends
static" at a later stage would only cause portability issues between
different versions of PHP7. If we are going to have this, better add it now..
+1
Cheers,
Márcio