HNHacker News
TopNewBestAskShowJobs

kobzol

76 karma · joined May 22, 2023

https://github.com/kobzol
submissionscomments
kobzol··on Writing Python like it's Rust
Yep. This is actually one of the most useful features for me, autocompletion and Go to definition. I don't actually even use an actual type checker in most projects, unless they are more production-critical.
kobzol··on Writing Python like it's Rust
I will someday :) But unless there's Tensorflow and about a gazzillion other packages in Nim, it's not easy to switch.
kobzol··on Writing Python like it's Rust
Sorry :) Not that kind of "like Rust".
kobzol··on Writing Python like it's Rust
This probably plays a role. But for me, I started with C#, but still after I later used Python, I wasn't using types at all. Only after I got more experience in programming, and especially was exposed to Rust, then I started to write Python in a.. different way :)
kobzol··on Writing Python like it's Rust
Someone else also mentioned this on Reddit, good point.
kobzol··on Writing Python like it's Rust
I didn't know about that, thanks. I kind of agree with a sibling comment that in most cases you don't want to expose an indexer if the fields are named, but it might be useful sometimes.
kobzol··on Writing Python like it's Rust
Good point! Guido mentioned that maybe in the future, the new "mini-JIT" in CPython might be able to leverage the type hints. I also want to have this as a thesis topic for my students, to try it out.
kobzol··on Writing Python like it's Rust
I agree that it's not easy to explain this to other people, and Python tooling in general is pretty terrible. OTOH, having types in the code and giving newcomers to the codebase the ability to actually see what types "flow" through functions, and having the ability to "Go to definition" is a big benefit for introducing old Python code to newcomers.
kobzol··on Writing Python like it's Rust
Hey now. Async in Python ain't that bad :)
kobzol··on Writing Python like it's Rust
https://dropbox.tech/infrastructure/rewriting-the-heart-of-o...
kobzol··on Writing Python like it's Rust
I agree that in most cases it should be rewritten for production, but in my experience that quite often doesn't happen, and AI stays in Python even for production usages.
← PreviousPage 2 of 2