On 8 February 2023 16:14:07 GMT, Lydia de Jongh <flexj...@gmail.com> wrote:
>From a programmer's perspective, the property is declared and should be
>accessible. Even if it has no value.
>There should be no difference between typed and none-typed properties for
>this.

I've actually been considering a proposal to remove this difference *the other 
way around*: if a property is declared but never assigned a value, consistently 
giving an error on access, regardless of whether a type was declared or not. 

Currently, properties can be in a number of different states: declared and 
assigned, undeclared, undeclared but created dynamically by assignment, 
declared without type and not yet assigned, declared with type and not yet 
assigned (Uninitialized), declared without type but then unset (distinct from 
both the unassigned and Uninitialized states) ... possibly other combinations 
I've forgotten.

Now that we have the Uninitialized state, and have deprecated dynamic 
properties, this could mostly be reduced to two: has a current valid value, or 
Uninitialized. But the details of what would need to change and when are the 
subject for a future discussion.

Regards,

-- 
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to