| ▲ | Ask HN: Why is Rust still hard to use as a scripting language? | |
| 2 points by harleyverse 9 hours ago | 2 comments | ||
I like Rust, but the edit-run loop still feels heavier than I’d like. Sometimes I don’t care about runtime performance. I just want to write some code, run it quickly, see what happens, and keep tweaking. I know there are things like rust-script, cargo-script, evcxr, and incremental builds, but I haven’t found a setup that feels as casual as Python/Ruby. Is this just the wrong way to think about Rust, or are people actually using it this way? Curious what setups people here use when they want Rust, but with faster feedback. | ||
| ▲ | db48x 4 hours ago | parent | next [-] | |
You're thinking about rust the wrong way. When you want to write in that exploratory way you should use a language that supports it, like Python, Javascript, or Lisp. These are all memory–safe languages that trade run–time speed for developer productivity. You can implement new features in them extremely quickly, and later if performance becomes an issue you can reimplement in Rust with the benefit of already knowing what you are writing. | ||
| ▲ | TheFirstNubian 6 hours ago | parent | prev [-] | |
I’ve used Rust daily for the last 6 years; from writing compilers and WASM runtimes to writing smart contracts and SDKs… and the experience has been nothing short of amazing. I’m not sure what you mean by a “casual setup,” but I find Cargo to be very easy to use. Granted, compilation can be pretty slow, but it’s a small price to pay for the runtime performance. If by “faster feedback” you mean something that looks and feels like Python’s REPL, then I think you’re missing the point here. Rust is a compiled language. | ||