Don’t get your hopes up about Python 4.0: Guido van Rossum, creator of the popular programming language, has said it will probably never see the light of day.
Van Rossum replied that he and the members of Python’s core development team were not exactly excited about the idea of Python 4, having learnt valuable lessons during the transition from Python 2 to Python 3 when the latter debuted in its final form in 2008.
“I’m not thrilled about the idea of Python 4 and nobody in the core dev team really is – so probably there never will be a 4.0 and we’ll just keep numbering until 3.33, at least,” he said in a video Q&amp;A.
“Python 4, at this point whenever it’s mentioned in the core development team, it is very much as a joke… We’ve learned our lesson from Python 3 vs 2, and so it’s almost taboo to talk about a Python 4 in a serious sense.”
Python 2.7.18 was the last release in the Python 2.7 lifecycle, released in April 2020. Van Rossum had warned that Python 3 would not be compatible with Python 2, and developers who had created dependencies of software libraries based on Python 2 couldn’t upgrade to version 3.0.
It was a slow and painful migration period that stretched on for years, and clearly one van Rossum and co. aren’t in any rush to relive.
“I normally talk about that as a mistake, because Python was more successful than the core developers realised and so we should have been much more aware and supportive of transitioning from Python 2 to Python 3,” said van Rossum.
“In our own experience, we thought the transition would be relatively simple because we were all like the Einsteins of Python programming, and we could translate code from Python 2 to Python 3 in our sleep.”
Van Rossum didn’t rule out the possibility of Python 4.0 entirely, though suggested this would likely only happen in the event of major changes to compatibility with C. “I could imagine that at some point we are forced to abandon certain binary or API compatibility for C extensions… If there was a significant incompatibility with C extensions without changing the language itself and if we were to be able to get rid of the GIL [global interpreter lock]; if one or both of those events were to happen, we probably would be forced to call it 4.0 because of the compatibility issues at the C extension level,” he said.
SEE: The best programming languages to learn–and the worst (TechRepublic Premium)
Yet with Python 3.10 expected in October and some significant speed improvements expected in version 3.11, van Rossum stressed that the focus was very much on releasing incremental updates to the programming language for as long as possible.
“We now have a strict annual release schedule, so after [Python 3.10] will be 3.11 and after that will be 3.12, and so forth. We can go up to 3.99 before we have to add another digit. Adding another digital is not completely trivial, but still much better than going from [Version] 3 to 4.
“The speeding up for Python is just going to be incremental. Some new speed will be coming in 3.11 and then we’ll speed it up more in 3.12 and 3.13, and so on.”
Speeding up Python is a primary focus of Python’s core development team, with van Rossum announcing at this year’s Language Summit that he was aiming to double the performance of CPython in version 3.11.
During the interview, van Rossum also noted efforts to speed up the language by external projects like including Pyston, an implementation of Python 3.8.8 that started out at Dropbox before being open sourced. Its creators recently released Pyston 2.2, which promises a 30% performance improvement over CPython 3.8.8.
“Making Python faster is suddenly back on the front page of the news, I would say. I hope that with my team I’ll be able to contribute something to that field. Because I do know something about that area,” van Rossum said.
“Now, we feel we have about a year to prove that we can move the needle on Python performance, and 3.11 will be much faster than 3.10.”
Van Rossum shared his thoughts on other programming languages, saying he admired Rust’s ability to improve C++ code and citing Go as one of the most interesting new “Pythonic” programming languages.
The Python creator also described how Python had, in more recent years, started looking to TypeScript as a determiner of where things could be headed. “You might have noticed that in the past, six or seven years we’ve been adding optional static typing to Python, also known as gradual typing,” he said.
“I wasn’t actually aware of TypeScript when we started that project so I can’t say that we were inspired by TypeScript initially… Nowadays we definitely look at TypeScript for examples and we sometimes propose new features because we know that certain features were initially lacking in Typescript, and then added to it based on user demand and were very successful.”
Python is still trying to figure out how to recreate some of these successes, van Rossum said. “Anders [Hejlsberg] is a really smart guy. [TypeScript] did few things that Python is still sort of waiting to figure out.
Subscribe to the Developer Insider Newsletter
From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays