Re: [RFC] [DISCUSSION] Compact Object Property Assignment

From: Date: Fri, 20 Mar 2020 23:47:29 +0000
Subject: Re: [RFC] [DISCUSSION] Compact Object Property Assignment
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-109175@lists.php.net to get a copy of this message
On Wed, Mar 18, 2020 at 12:27 AM Michał Brzuchalski <michal.brzuchalski@gmail.com> wrote: > Using Object Initializer enforce that if a class is instantiated with the Object Initializer, > at the end of the instantiation and properties initialization, all visible properties > (depends on initialization scope) are initialized, otherwise, a RuntimeException is thrown. > This helps to avoid bugs where a property is added to the class but forgot to be assigned > it a value in all cases where the class is instantiated and initialized. > https://wiki.php.net/rfc/object-initializer#restrictions Got it. Out of curiosity, would you be able to summarize why you believe your proposal was not accepted?

« previous php.internals (#109175) next »