logoalt Hacker News

tyre • yesterday at 9:48 PM • 1 reply • view on HN

The bits about typing and not needing a certain python version are great reasons that go beyond it being faster.

Another is memory usage, which Python and Ruby have historically struggled with. You might not be compute bound (I have a similar experience with primarily I/O bound) but you're going to need a much bigger box to process the same work with a meaningfully sized app.


Replies

kstrauser • today at 2:03 AM

Python makes it easy to hold references to a lot of data forever such that it never gets garbage collected. The bad side is you need to be mindful of data lifetimes, and not, say, slap @cache on everything. The good side is that it’s possible to be mindful and keep that stuff down.

Honestly, hacking on Rust stuff’s been good for me as a Python programmer. It makes you have to pay attention to lifetimes and you can’t accidentally keep reference to all the things. Keeping its borrow checker happy reminded me about some Python good habits that are too easy to let slip.