On Thu, 31 Jan 2019 at 10:53, Benjamin Morel <benjamin.mo...@gmail.com> wrote:
> Please forgive my stubborness, too. I fail to see how WordPress supporting > PHP versions that have been EOL for YEARS can be of any help to the > community? > I agree, it probably doesn't help the community; but it happens, both in open source projects, and in the many private code bases which are written in PHP. The more breaking changes we make in the language, the *more* likely it is that people will stay on old versions, where their code works without modification, and have a negative opinion of upgrades. > Now what prevents PHP from adding consistent function names / APIs, and > deprecating the older ones? We can keep the old ones for 10 more years if > you wish, but at least new PHP code can start using the "correct" ones, and > progressively the share of PHP code out there using the old ones should > progressively get lower over the years, up to the point where we could > eventually decide that it's not worth keeping them. > The problem comes if the share using the old names *doesn't* decline enough (and how would we even know?). What if people's muscle memory, their coding standards, their need for progressive compatibility, their tools, the tutorials they follow, the code snippets they copy, all make it easier to just keep using the old names? Then our "deprecation" means nothing, and we are stuck with a long list of aliases to maintain, and people learning the language scratching their heads at inconsistent examples. To be more positive, I am all for introducing new ways to do existing things in the language where they have real benefits to the user. For instance, a new file-handling API, with better error handling, and object-based streams, would be great; or a replacement for the frankly awful curl functions. Perhaps even a well-designed implementation of "scalar methods" (e.g. being able to write [1, 2, 3]->map($callback)->filter($callback);) would have users enthusiastic enough that they *want* to upgrade their code to use it, although it takes us close to "completely new language" territory. If we can persuade every user of PHP that the change is bringing them a real benefit to outweigh the cost of re-writing and re-learning, then we can make grand changes to the language; I don't think moving underscores around will ever do that. Regards, -- Rowan Collins [IMSoP]