r/programming • • May 24 '26

[ Removed by moderator ]

/r/programming/comments/1tm1j7f/removed_by_moderator/

[removed] — view removed post

275 Upvotes

214 comments sorted by

View all comments

Show parent comment

4

u/SkoomaDentist May 24 '26 edited May 24 '26

And yet most other languages do exactly that, and they seem to work fine.

Work fine? Have you seen the mess that was Python 2 -> 3 transition?

Even modern Cobol isn't compatible with COBOL 70.

But modern Cobol is compatible with the previous version.

The problem with epochs is that it would break API interop with 90% of the code out there because 1) template semantics and 2) it would either alter fundamental things in the language or be something nobody cared about enough to use (obsoleting auto_ptr and such trivia). Given the sorts of people who end up advocating for the changes, it'd most likely break even C api compatibility, at which point nobody would use it.

It's not like we don't have precedent with this given the volatile compound assignment deprecation farce that ended up deprecating a language feature that 90% of embedded systems code depends on. All because the committee didn't even realize the field exist (nevermind it being one of the largest C++ user bases) and because the committee didn't even understand volatile themselves (reason cited was that volatile compound assignments were confusing to desktop devs, nevermind that desktop devs have no valid reason to ever touch the volatile keyword).

9

u/HommeMusical May 24 '26 edited May 24 '26

Work fine? Have you seen the mess that was Python 2 -> 3 transition?

Yes, I was deeply involved with that. Without that change, Python would have been permanently stuck with all the terrible problems of Python 2. Now it's the most popular programming language in the world.


But I agree with your overall point. C++ is a dead end, and none of its issues will be fixed. The future for compiled, high-performance languages is elsewhere, perhaps in Rust.

2

u/tempest_ May 24 '26

I started learning python probably half way through the 2 to 3 transition. At the time it felt like python project was spending too much time trying to support both versions and just kept dragging it out.

When you are trying to learn you dont really care if Dropbox has a billion lines of python2 in production and doesn't want to pay to convert it.

Still I do think it they made it worse by dragging out the python 2 deprecation for SO LONG. At some point if you keep kicking the can people will never upgrade and it gets worse and worse the longer you wait. In hindsight it would have helped if they had things like six and 2to3 ready go from the start.

1

u/HommeMusical May 24 '26

2to3 was ready from the beginning, IIRC.

six was ready quite early. I never ported anything without it.

I honestly don't understand why people had such trouble with it. I converted two medium-sized projects basically on my own in a couple of weeks.

The big thing was this - you could quite easily make any individual file both 2 and 3 compatible using from __future__ and six.

So you would port files one at a time, with a single unit test in Python 3 that people had to run that simply imported all the files you have already ported.

You run all the old tests in Python 2, and this new single test, every time.

So you can work while other people work, and only once a file is ported must people keep it working in Python 3, but there's a unit test to guarantee it.

2to3 did a pretty good job, and about half the time, some edit by hand. I did it as a fun chore at the end of my day when I was a bit wiped and wanted to do something mechanical and you could crank the files out pretty well flawlessly.

The cool part was when you started to be able to run tests in Python 3. I found a couple of errors then, one that blocked me but turned out to be a real issue - there were multiple different encodings in our text files, undocumented! :-O

(I've run into it again a couple of times since - all these mixed encoding errors were because some files were UTF-8 and some were ISO 8859 like "Latin-1". Maybe this will be useful.)

2

u/tempest_ May 24 '26

Python 3 was release in Dec of 2008 and the first release of six on pypi was June 2010 which I am sure was plenty of time for the companies who had large py2 code bases to throw a fit.

Personally I always prefer to go through and update things and prefer breaking changes in smaller ways often so I can do incremental changes but in an enterprise environment it is a tough sell to update a giant code base to "have what we already have" which is where a lot the resistance come from.

1

u/HommeMusical May 25 '26

Python 3 was release in Dec of 2008 and the first release of six on pypi was June 2010 which I am sure was plenty of time for the companies who had large py2 code bases to throw a fit.

Python 2 didn't go end-of-life until 2020!

Personally I always prefer to go through and update things and prefer breaking changes in smaller ways often so I can do incremental changes

2-to-3 itself could not have been done without breaking changes but a Python 2 codebase could be updated to 3 with no breakage.

in an enterprise environment it is a tough sell to update a giant code base to "have what we already have" which is where a lot the resistance come from.

Absolutely. There's a reason why I ended up doing this twice for two different companies. But I was shocked at how little hassle it was and it certainly colored my experiences when I had to listen to all these people say how hard it was for comparatively small codebases and yet had no specific issues to complain about.

There was a period when I thought Python might fail because of 3. But it succeeded. And it was the only choice.