On Tue, 5 Feb 2019 at 16:39, Levi Morrison <le...@php.net> wrote: > I just wanted to pipe in to suggest an alternative approach to > accomplish some of the same goals: an external PropertyIterator. >
I believe Nikita suggested something similar, and while it would certainly be useful it doesn't accomplish the same goals as this proposal. The goal of this proposal is to make the language more consistent and less surprising. The *iterable* type accepts a plain array, but not an object that is used to represent a plain array, that's surprising to me. *stdClass* is "promoted" as part of the language, it's use is not advised against anywhere in the manual, and it's the default response format for *json_decode()* To me, this class is presented as a first class citizen, but it works like a second class one. As it looks like my first approach to resolving this inconsistency is likely to fail the vote, I'm considering a second approach now to update the docs and "officially" deprecate/discourage usage of *stdClass*