On 19/09/2018 22:58, Marco Pivetta wrote:
Also, there are scenarios (discussed in typed properties v1) that make the uninitialized state actually favorable (every serializer ever, like every one, really).
I still find a problem with this idea that everything must be initialized. If I am working with business logic built into the database then 'NULL' is very much a valid state and when I create an object encapsulating a record it's values should be NULL until it is actually download, or more normally until a new record has SOME of it's fields populated. It is simply not sensible to be nailing down every variable that is being passed and it is certainly not 'bad coding' to be working with uninitialized data - it's handling just what needs to be initialized that is the job of the code. And that is unlikely to be done in the constructor!
-- 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