Re: Non-nullable properties
| From: | Dan Ackroyd | Date: | Sun, 15 Jul 2018 23:52:53 +0000 |
| Subject: | Re: Non-nullable properties | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-102832@lists.php.net to get a copy of this message | ||
On 14 July 2018 at 14:09, Rowan Collins <rowan.collins@gmail.com> wrote:
> Hi all,
>
> The current RFC proposes the next simplest solution, which is to allow non-nullable types, and
> trust the user to initialise them before use.
From the RFC:
> If a typed property does not have a default value, no implicit null default value is implied
> (even if the property is nullable).
> Instead, the property is considered to be uninitialized. Reads from uninitialized properties
> will generate a TypeError
Are you miss-quoting the RFC?
Because those two sentences are completely different.
cheers
Dan