4 ms·
The difference is that JS has to be backwards compatible in order to not break 50% of the internet. With PHP, it is theoretically possible to make a major versi
by akatechis 8y ago
The difference is that JS has to be backwards compatible in order to not break 50% of the internet. With PHP, it is theoretically possible to make a major version upgrade that fixes most if not all the issues without worrying about breaking backwards, since upgrading is opt-in.
- Klathmon 8y agoUpgrading was opt-in with python as well, and look at where breaking changes got them... A decade in and there's still a massive rift in the python community over 2 vs 3. PHP is backwards compatible almost to a fault, but that doesn't mean you can't use new libraries or frameworks that hide those warts away from you, and that's a MUCH better choice in my opinion than making a significant percentage of the internet incompatible with the latest PHP so that your function arguments for a handful of old function calls can all look the same...
- anchpop 8y ago"massive rift" is a bit of an exaggeration. Most Python libraries have Python 3 versions and it's not at all uncommon to see libraries that don't have support for Python 2 (see Django)
- Klathmon 8y agoI don't think it is. Sure, it's not like they are 2 different languages, but it's something that all python developers will have to keep in mind when using libraries. Not to mention the headache of having both installed on many systems (what does `python` give me?), and there are still many things that don't have python3 versions still (node-gyp is the one that still bites me every day). It's not the end of the world, and it is getting better every day, but having to spend the better part of a decade dealing with multiple "main" versions of a language is not something that I want any other languages I use repeating. And if that means needing to lookup if the function is urlencode or url_encode, well i'm happy to pay the price.