On 06/09/2021 18:36, Björn Larsson wrote:
In case of deprecation of stdClass I would like to point out that the
benefit of replacing "new stdClass" with "new DynamicObject" in our
existing code is absolutely zero. However, using DynamicObject in new
code has a benefit since the intent is clearer.
Just to mildly challenge this: Why is the intent of old code any less
important? Do you never hire junior developers, or those cross-training
from other languages, who have to maintain that code? Do you never have
days where your brain is just a bit fuzzy, and every extra meaning you
have to think about is one less line of code you'll get written?
But yes, for experienced PHP developers, the name is not that big a
deal. Indeed, a lot of PHP developers probably never even see it. It's
one of those little "paper cuts", where if we can make the fix not too
painful (including deprecation messages not being too annoying), it will
pay off in the long run.
Regards,
--
Rowan Tommins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php