Python and JS can both execute code when loading libraries (`import foo` and `require('foo')` respectively).
Yet the Python CLI apps I've seen have to do much more work to ensure good startup performance (e.g. `myapp --help` not being slow). I'm not sure why.
Related Posts
It's so strange that we talk about languages being slow, and have done for years. Computer performance has increased so much in this time.
https://hbfs.wordpress.com/2009/11/10/is-python-slow/ (shared on HN in 2009) discusses Python being slow. My underpowered Thinkpad has 20x the single-threaded performance! https://www.cpubenchmark.net/compare/73vs3766/AMD-Athlon-64-4000+-vs-AMD-Ryzen-5-PRO-4650U
Maybe *relative* performance of languages matters more?
I'm pretty impressed with Cursor: I've successfully asked it to perform codebase transforms in English, and it's worked!
E.g. "Replace all calls foo(..., true) with foo_immediate(...) define a foo_immediate function".
I'm still reading the diff and checking tests -- it's still AI after all.
Coming from JS or Python, imports in Rust feel weird. They're entirely optional aliases for fully qualified symbols, which are always available.
I don't know of many other languages where you can just start using libraries. Java is the only one I can think of.