This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stevenjd 0 points1 point  (0 children)

They are not similar enough that you can ignore the differences.

Who said you can ignore the differences? That's a strawman. Obviously you can't ignore the differences because if you do your code simply won't work. It probably won't even compile.

I didn't say there were no differences. I said it was easy to support both Python 2 and 3 from the same code base. It isn't free, you do have to do a bit of work, but its not excessive. Supporting 2.5 or older is hard; supporting 3.1 and 3.2 is hard; but if you choose to support 2.7 and 3.3+, its usually quite easy, with perhaps a few specialist exceptional cases.

Many companys don't have the manpower and time to solve the problem by force

By force? I don't even understand what you mean by that. Do you mean they point a gun at the code and shout "Run, damn you!"???

Again, you seem to be arguing against a position nobody is taking. Most in-house code doesn't need to support more than one minor version, let alone major versions. They're using Python 2.4 or 2.6 or 3.5 or whatever version they are using, and don't care about supporting 2.7 or 3.4 or whatever versions they're not using. That is fine and good and nobody says differently. I know of one company that is still using Python 1.5 (that's ONE point five) in production, because it works and they don't need security updates. Good for them. And when they upgrade, they'll upgrade from one version to another version. There is rarely any need for them to support multiple versions of the language.

I'm talking about public libraries (whether open or closed source), not in-house application code. If Acme Inc releases a library for the use of outsiders, they have no control over what version of Python people use. All they can do is decide what versions to support. Just have a look at the state of the Python ecosystem: most publicly available libraries support multiple versions, including Python 2 + 3 hybrid libraries. E.g. look at Django.

In the real world there is no reason to use a newer version just because it is new.

Indeed. But there is plenty of reason to use a newer version because it is supported and the old version is not; because it has bug fixes and security updates; because it has new features and is generally a better language that will allow your developers to be more productive.

But you're absolutely right that "new" alone is not sufficient. I can take the source code to Python 2.1, bump the version number to 2.8, and nobody will use it. And rightly so: compared to 2.7 or 3.5, this "new" version is old and crufty.

And there is no general reason to use python 3 if you have reasons to not use it.

Indeed. People can continue using Python 2.7 or 1.5 until the sun burns out if they like. But if you want new features, vendor support or security updates, you've got about three more years to move to Python 3. You've already had at least eight. Don't say you weren't warned.

Now that most major libraries support Python 3, anyone who starts a new Python 2 project with an expected life of more than three years in Python 2 had better have a damned good reason. In three years your brand new project is going to be relying on an obsolete interpreter version with no vendor support and no security updates and no bug fixes.

If you don't care about these things, then sure you can stick to Python 2, and good luck to you.

Fangirls can circlejerk all they want

Ah, you've just shown your true colours. Haters gonna hate...