4 ms·
> The jump from 5.6 to 7.x has enough breaking changes to make you cry. It's not just PHP. But Python 2x / 3x as well. Just to point something out: this is
by DannyB2 8y ago
> The jump from 5.6 to 7.x has enough breaking changes to make you cry.
It's not just PHP. But Python 2x / 3x as well.
Just to point something out: this is one reason why Java is so well liked for large enterprise code bases. They have been religious about backward compatibility in new versions.
A 2nd principle I would advocate is that if there must be a breaking change, it should be caught at compile time, not at run time. The project should fail to build, and the errors point you to exactly where the source code problems are.
Other language systems would do well to embrace backward compatibility and build time errors over run time errors. IMO.
- consp 8y ago> ... But Python 2x / 3x as well. That was one of the lowest effort upgrades I ever did for my company (backend services, no front end websites). One of the other reasons Java is popular in big companies is the low effort it requires to find people who can work with it.
- fucking_tragedy 8y ago> That was one of the lowest effort upgrades I ever did for my company (backend services, no front end websites). If your application does a lot of ASCII/unicode/raw string and byte manipulation, the transition from Python 2 to 3 can be very cumbersome.
- teh_klev 8y ago> But Python 2x / 3x as well. But at least the python folks provided some tooling to bridge the gap between v2 and v3 such as backporting features from python 3. Also minor version updates generally don't break whole codebases. Apropos Java backwards compatibility, Microsoft has been pretty good at ensuring strong backwards compatibility with .NET code. I've seen .NET 1.0 source compile and run just fine on .NET 4. Hell I've even witnessed .NET 1.0 binaries run just fine without recompilation in newer .NET environments. Sure there's breaking differences between .NET Standard and .NET Core but they're two different products and that was made pretty apparent from the get-go.
- kevin_thibedeau 8y agoIt's not like we didn't have 10+ years of forewarning and many available ways to prepare 2.x codebases for a smooth transition. My 2.7 code passes through 2to3 with only the occasional manual fixup required because I heeded the warnings.
- mywittyname 8y agoJava was designed upfront to be a language for large-team, long-lived, enterprise development. Whereas Python and PHP were originally toy languages that ended up filling a popular niche. I mean, I agree with you. But Java benefits from well thought-out design constraints, ground-up IDE support, and an amazingly flexible bytecode interpreter. Normal people in the early 90s didn't have the resources to produce a language like Java.