On Wed, Mar 18, 2020 at 12:27 AM Michał Brzuchalski
<michal.brzuchal...@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?

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

Reply via email to