Why Python 4.0 May Never Arrive, According to the Language’s Creator – Van Rossum

Don’t get too excited about Python 4.0; according to Guido van Rossum, the popular programming language’s creator, it is unlikely to ever be released.

Contents

Python 4.0: Unlikely to Happen

Van Rossum was asked about Python’s future and whether version 4.0 would ever be released in an interview with Microsoft Reactor.

Lessons Learned from Python 2 to Python 3 Transition

Van Rossum responded that he and the Python core development team were not particularly enthusiastic about the idea of Python 4, having learned important lessons during the transition from Python 2 to Python 3, which made its debut in its final form in 2008.

Core Dev Team’s Stance on Python 4.0

In a video Q&A, he said, “I’m not overly excited about the idea of Python 4 and nobody in the core dev team really is – so probably there won’t be a 4.0 and we’ll just keep numbering until 3.33, at least.”

“We’ve learned our lesson from Python 3 vs. 2, so it’s almost taboo to talk about Python 4 in a serious sense at this point, whenever it’s mentioned in the core development team.”

The Painful Migration from Python 2 to Python 3

The final version of Python 2.7, released in April 2020, was Python 2.7.18. Van Rossum had forewarned that Python 3 would not be backward compatible with Python 2, and that programmers who had built dependencies of library software based on Python 2 would not be able to upgrade to version 3.0.

Challenges of the Migration Process

It was a long, slow, and painful migration process that van Rossum and company are obviously not eager to repeat.

“We should have been much more aware of and supportive of the transition from Python 2 to Python 3,” said van Rossum. “I normally talk about that as a mistake, because Python was more successful than the core developers realised,” he said.

“Because we were all like the Einsteins of Python programming and could convert code from Python 2 to Python 3 in our sleep, we believed the transition would be fairly easy.”

Potential Scenarios for Python 4.0

Van Rossum didn’t completely rule out the possibility of Python 4.0, but he did say that it would probably only happen in the event of significant changes to C compatibility.

Significant Changes Required for Python 4.0

“If there was a significant incompatibility with C extensions without changing the language itself and if we were able to get rid of the GIL [global interpreter lock], if one or both of those events were to occur, we probably would be forced to call it 4.0 because of the compatibility issues at the C extension level,” the developer said.

Focus on Incremental Updates and Speed Improvements

Van Rossum emphasised that the focus was very much on releasing incremental updates to the programming language for as long as possible, despite Python 3.10 being anticipated in October and some significant speed improvements anticipated in version 3.11.

Python’s Future Update Strategy

“Since we now adhere to a strict annual release schedule, Python 3.10 will be followed by 3.11, 3.12, and so on. Before we have to add another digit, we can go as high as 3.99. While not entirely simple, adding a second digital is still preferable to going from [Version] 3 to 4.”

“The acceleration of Python will only be incremental. 3.11 will bring some new speed, and 3.12 and 3.13 will bring even more speed, and so on.”

Main Goal: Making Python Faster

The Python core development team’s main goal is to make Python faster. Van Rossum stated at this year’s Language Summit that he planned to double CPython’s performance in version 3.11.

Van Rossum also mentioned external projects like Pyston, an implementation of Python 3.8.8 that began at Dropbox before being open sourced, during the interview as attempts to speed up the language. Pyston 2.2, which was just released by the program’s developers, promises a 30% performance boost over CPython 3.8.8.

“I’d say that making Python faster has suddenly returned to the front page of the news. I’m hoping that my team and I will be able to make a difference in that field. Since I am knowledgeable in that field,” van Rossum said.

“We believe we have about a year to demonstrate that we can improve Python performance, and 3.11 will be significantly faster than 3.10.”

Influences from Other Programming Languages

Van Rossum talked about other programming languages, calling Go one of the most intriguing new “Pythonic” languages and praising Rust’s capacity to enhance C++ code.

Python’s Inspiration from TypeScript

The inventor of Python also discussed how Python had begun to look to TypeScript in more recent years as a predictor of potential directions.

“You may have noticed that over the last six or seven years, gradual typing, also known as optional static typing, has been added to Python,” he said.

“I can’t say that we were initially inspired by TypeScript because I wasn’t actually aware of it when we started that project, but today we definitely look to TypeScript for examples and we occasionally propose new features because we are aware that some features were initially missing from TypeScript but were later added based on user demand and were very successful.”

According to van Rossum, Python is still attempting to determine how to duplicate some of these successes. “Anders [Hejlsberg] is a very intelligent man. There were a few things [TypeScript] accomplished that Python is still trying to figure out.”

Here is a reddit discussion on this topic : Reddit

Conclusion

According to our conversations, TypeScript is gaining knowledge from Python in the same ways that JavaScript has in some cases.