Re: [RFC] Constructor Property Promotion
| From: | Chase Peeler | Date: | Thu, 26 Mar 2020 16:20:04 +0000 |
| Subject: | Re: [RFC] Constructor Property Promotion | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109339@lists.php.net to get a copy of this message | ||
On Thu, Mar 26, 2020 at 9:33 AM Paul M. Jones <pmjones@pmjones.io> wrote:
>
>
> > On Mar 26, 2020, at 08:30, Nikita Popov <nikita.ppv@gmail.com> wrote:
> >
> > Hi internals,
> >
> > I would like to submit the following RFC for your consideration:
> > https://wiki.php.net/rfc/constructor_promotion
>
> Big fan. Thanks for this.
>
>
I like this too. One question (and apologies if I overlooked this in the
RFC), but is type-hinting required, or would the following be accepted:
class bar {
public function __construct(public $foo){}
}
>
> --
> Paul M. Jones
> pmjones@pmjones.io
> http://paul-m-jones.com
>
> Modernizing Legacy Applications in PHP
> https://leanpub.com/mlaphp
>
> Solving the N+1 Problem in PHP
> https://leanpub.com/sn1php
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Chase Peeler
chasepeeler@gmail.com