On 21/09/2018 08:58, Rasmus Schultz wrote:
No matter how you twist it, uninitialized is the new null.
I'm fine with unintialized as an implementation detail that
ensures you can't read from properties while the constructor
is busy establishing the invariant.
I'm not at all fine with unintialized as a new language feature.
Ignoring the debate on uninitialized/null ... not all objects ARE
invariant and there are very good reasons for not setting values for
everything, but it seems that these types of object are deemed to be
'bad coding' where in fact the simply have elements that yet to be
'initialized' if at all for this instance of the object. The constructor
simply creates those elements that need to exit and does nothing with
the holders for elements that have yet to be populated ... they stay null.
--
Lester Caine - G8HFL
-----------------------------
Contact - https://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - https://lsces.co.uk
EnquirySolve - https://enquirysolve.com/
Model Engineers Digital Workshop - https://medw.co.uk
Rainbow Digital Media - https://rainbowdigitalmedia.co.uk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php