|
|
Log in / Subscribe / Register

Exciting changes for python

Exciting changes for python

Posted Aug 4, 2025 12:13 UTC (Mon) by mb (subscriber, #50428)
In reply to: Exciting changes for python by anselm
Parent article: Following up on the Python JIT

You say that companies should quickly write Python code do get things going and then rewrite stuff in another language when they realize that it's too slow?
Well, Ok. So? It's fine.
I just don't see how that makes Python "perfectly adequate". It's a business decision. Not a technology decision. It could very well be a technology lock-in by now.

I have just experienced the exact opposite of "Python performance is perfectly adequate for a large number of use cases".
In my experience it's only adequate if the performance critical part is actually written in some other compiled language.

The initial advantage of extremely fast development quickly turns around into extremely slow execution times and extremely slow development times due to dynamic typing getting out of hand. Did you ever do a major refactoring of some large Python code base? It takes years to find all corner cases and error paths. And you can never be sure that you got everything.


to post comments

Exciting changes for python

Posted Aug 4, 2025 15:09 UTC (Mon) by anselm (subscriber, #2796) [Link] (1 responses)

The initial advantage of extremely fast development quickly turns around into extremely slow execution times and extremely slow development times due to dynamic typing getting out of hand.

I've been writing (mostly) Python code for a living for quite some time now and I'm doing just fine, thank you. In my team we tend to experience neither “extremely slow execution times” nor “extremely slow development times”. Our customers are happy, too. YMMV.

As far as dynamic typing is concerned, there are now quite good type checkers for Python and they're getting better all the time. It's definitely possible to write terrible code in Python just like it is possible to write terrible code in pretty much any other programming language. But OTOH it's also possible in Python – perhaps even more so than in some other popular programming languages – to write good-looking code that is correct, maintainable, memory-safe, and reasonably fast. Also in fairness it must be said that current versions of Python are noticeably faster than they used to be in the past. Will Python code ever be as fast as, say, compiled Rust code? Probably not. Does it matter? It depends. But I wouldn't discount Python out of hand.

Exciting changes for python

Posted Aug 4, 2025 15:57 UTC (Mon) by mb (subscriber, #50428) [Link]

>As far as dynamic typing is concerned, there are now quite good type checkers for Python and they're getting better all the time.

Sure. If you use strict typing then maintainability is fine. But that throws duck typing out of the window and brings every downside from static typing languages into Python. And you still end up with a program written in a slow-by-design language that was at least as hard to write as a program in a compiled language.

>it must be said that current versions of Python are noticeably faster than they used to be in the past.

True. Today sometimes we get only a performance penalty of 5 times instead of 10 times. Maybe.
Are we ever going to reach 1:1 with a compiled language? No. Well, maybe yes, but then every feature that makes Python superior for prototyping has been thrown out of the window.

I think Python is a wonderful language and I write code in Python all the time.
The language is extremely powerful and fun for writing small scripts and prototypes.
But it's important to know the limits and notice when it's time to completely rewrite the project in a proper compiled language before the maintenance dance begins.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds