Re: Making stdClass iterable
| From: | Benjamin Morel | Date: | Mon, 14 Jan 2019 15:28:40 +0000 |
| Subject: | Re: Making stdClass iterable | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103737@lists.php.net to get a copy of this message | ||
>
stdClass can't die due to a lot of backwards compatibility
> in existing
code (wordpress loves it)
I, personally, would LOVE to see PHP break things on each release of a
major version!
I fail to see how upgrading could be painful, with a good changelog and the
right E_DEPRECATED notices for a minor release or two, enough time to make
it run in dev and even production, and working on deprecation notices as
they appear in the log; this would make the language move much faster
towards a better language.
But I digress.
On Mon, 14 Jan 2019 at 16:18, Marco Pivetta <ocramius@gmail.com> wrote:
> On Mon, Jan 14, 2019 at 4:09 PM Benjamin Morel <benjamin.morel@gmail.com>
> wrote:
>
>> > We should never have added stdClass.
>>
>> Why not deprecate it then, instead of extending it and giving it more
>> legitimacy?
>> This would remove some of the "2 ways of doing the same thing", such as
>> json_decode().
>>
>> Ben
>>
>
> This.
>
> stdClass can't die due to a lot of backwards compatibility
> in existing
> code (wordpress loves it), but in any code I've written over the past 5
> years, the first thing I'd do with it is get rid of it as fast as possible.
>
> Making it more powerful will just make the problem bigger.
>
> Marco Pivetta
>
> http://twitter.com/Ocramius
>
> http://ocramius.github.com/
>
>