Switching to a new version isn’t worth the time or the risk.
Radu Murzea asks:
First, some context (stuff that most of you know anyway):
Every popular programming language has a clear evolution, most of the time marked by its version: you have Java 5, 6, 7 etc., PHP 5.1, 5.2, 5.3 etc. Releasing a new version makes new APIs available, fixes bugs, adds new features, and new frameworks. So all in all, it’s good.
But what about the language’s (or platform’s) problems? If and when there’s something wrong in a language, developers either avoid it (if they can) or they learn to live with it.
Now, the developers of those languages get a lot of feedback from the programmers that use them. So it kind of makes sense that, as time (and version numbers) goes by, the problems in those languages will slowly but surely go away. Well, not really. Why? Backwards compatibility, that’s why. But why is this so?
This question has been edited for brevity. See the full, original question with lots of talk about PHPright here.
Danger: Bugs ahead
Josh Kelley answers (45 votes):
You’re underestimating the impact of backwards compatibility; your estimate that all active projects would migrate in 3 or 4 years is far too optimistic.
Suppose I’m a PHP developer. PHP has flaws, but I know how to work around those flaws — that’s part of the reason I get paid as a PHP developer. Now suppose that PHP 8 comes out and fixes those flaws, but it’s not backwards compatible. As a result, I have to spend time updating my code for PHP 8. That’s time that I could spend responding to customer requests, implementing new features, and keeping up with the competition. Even after I’ve done this, there’s a good chance that I’ve missed some corner case or unforeseen compatibility issue and introduced bugs in my code.
Given these challenges, there’s a strong incentive to never migrate to PHP 8, even if it is “better, clearer, more secure etc.” It’s estimated that there are still billions of lines of COBOL (!) Even though there are obviously much better technologies available, the cost of an update combined with the risk of bugs isn’t worth it.
Second, even if I decide to migrate my own code, any nontrivial app depends on third-party libraries, and there’s no guarantee that the third-party libraries will migrate. For example, Python 3 was released in December 2008, but four years later, Django (probably the leading Python web framework) still doesn’t have production-ready Python 3 support.
Related: “When to update jQuery?”
Don’t fix what isn’t broken
Kilian Foth answers (13 votes):
No, it won’t.
Changing existing, running code that “works fine” is not something that ranks high on any project’s priority list. Rather than applying effort to things that the managers thought had been paid for already just to be able to upgrade to a newer release of a language or platform, they will decree that the developers should just stay on the old release “for now.” You can try to entice your users with great features only available in the new release, but it’s a gamble where you risk decreasing your user base for no clear gain for the language. Cool, modern features cannot easily be weighed against the price of fragmented installation base in popular opinion, and you run the risk of getting a reputation as an “upgrade treadmill” that requires constant effort to keep running when compared to more relaxed languages and platforms.
(Obviously, most of this doesn’t apply to projects written by hobbyists just for their own pleasure. However (here be flamebait…) PHP is disproportionally rarely chosen by hackers because it’s such a pleasure to write with in the first place.)
Switching takes effort
Karl Bielefeldt answers (12 votes):
You’re making a lot of assumptions about human behavior. If you change it too much, people will evaluate your competitors, since they’re going to have to spend significant effort switching anyway. For open source languages, people will just fork the old version.
Look at Python for an example. Version 3.x has been available for four years, and still isn’t widely adopted. People try to use it for brand new projects, but I think you’re underestimating just how much code work is maintenance.
Of course, most people didn’t consider Python 2.x to be “flawed.” They didn’t have complaints like PHP users. PHP is in a much more precarious position, because a lot of people only stick with it because of its large existing code base. If you lost backwards compatibility, a lot of people would take the opportunity they’ve been waiting for to move to Python.
Find more answers or leave your own answer at the original post. See more Q&A like this atProgrammers, a question and answer site for professional programmers interested in conceptual questions about software development. If you’ve got your own programming problem that requires a solution, log in to Programmers and ask a question (it’s free).