Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103203 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28816 invoked from network); 20 Sep 2018 16:16:27 -0000 Received: from unknown (HELO mail4.serversure.net) (185.153.204.203) by pb1.pair.com with SMTP; 20 Sep 2018 16:16:27 -0000 Received: (qmail 26611 invoked by uid 89); 20 Sep 2018 12:23:04 -0000 Received: by simscan 1.3.1 ppid: 26603, pid: 26608, t: 0.0426s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@lsces.co.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 20 Sep 2018 12:23:04 -0000 To: internals@lists.php.net References: <239cea65-a832-29a5-11e5-ee721e3bd957@gmail.com> <88ff7632-7659-2f77-bb4c-20d32db178d8@gmail.com> Message-ID: <695cf880-eafa-286a-1062-f4da7cb53714@lsces.co.uk> Date: Thu, 20 Sep 2018 13:23:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2 From: lester@lsces.co.uk (Lester Caine) 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