Hi Larry, pon., 23 mar 2020, 01:48 użytkownik Larry Garfield <la...@garfieldtech.com> napisał:
> Hi folks. > > There have been a lot of RFCs and possible RFCs of late that are all > circling around the same related problem space: Working with objects right > now involves too much boilerplate to get things done. As I've mentioned > several times, I believe we need to be looking for broader solutions rather > than narrowly-focused one-offs. > > To that end, I have written an extensive analysis of the problem space and > the current and recent proposals. I've put it on my blog rather than > inline here because it's quite long and the blog offers better formatting. > > Discussion can happen here, but I'll also respond to comments there. > > In short: I believe our biggest potential win is to focus on 3 RFCs: > > * Constructor Promotion > That still doesn't resolve issue with lot of boilerplate when you deal with small objects for which public readonly is enough like object-initializer could. So I'm not sure about my vote here. It does solve only one narrow situation for me. * Named parameters > What would be nice for methods and functions. +1 * Compound Property Visibility > I didn't get it what benefits over property accessors it could have. > For details, see the full writeup: > > https://hive.blog/php/@crell/improving-php-s-object-ergonomics > > Thank you for your attention. > > -- > Larry Garfield > la...@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >