чт, 12 сент. 2019 г. в 16:00, Michał Brzuchalski < michal.brzuchal...@gmail.com>:
> Hi internals, > > I'd like to open discussion about RFC: Object Initializer. > > This proposal reduces boilerplate of object instantiation and properties > initialization in case of classes without required constructor arguments as > a single expression with initializer block. > > https://wiki.php.net/rfc/object-initializer > > I appreciate any feedback you all can provide. > > Thanks, > -- > Michał Brzuchalski > brzuc...@php.net > Thank you Michał for the RFC, I've have been keeping up with the thread and at this point, I do somewhat agree with people that maybe the RFC should go into V2 version development. It really seems like the scope of the RFC is just too small for the feature and it might be a good idea to expand it a bit. Also, I have this question - is there any performance to be gained here? Cause right now object hydration is an issue and is somewhat slow. Can it be optimised? Also, usually I don't really want properties to be public (aka writeable), so that means `private/protected` and I need to use the methods to set the properties or reflection. I might have missed or don't remember it, but I don't think I saw a discussion about that use-case. Value object, DTO's - all have a big use case for it. -- Arvīds Godjuks +371 26 851 664 arvids.godj...@gmail.com Skype: psihius Telegram: @psihius https://t.me/psihius