37 ms·
Having gone through Rustlings these past few days (via https://users.rust-lang.org/t/best-way-to-learn-rust-programming/47522/3 https://users.rust-lang.org/t/be
by tmsh 6y ago
Having gone through Rustlings these past few days (via https://users.rust-lang.org/t/best-way-to-learn-rust-programming/47522/3 https://users.rust-lang.org/t/best-way-to-learn-rust-program...), I feel like the speed of the Rust compiler has gotten a lot faster since I looked at it a few years ago.
And the compiler messages (once you get the hang of it; and the investment in learning the syntax is so trivially worth it in the long run) are so much richer and more helpful than other languages. So it really does "feel" like a REPL or most of the way there as a REPL (and I have one of the few wikis at our work advocating for Common Lisp that I wrote a year ago, and still actively follow Clojure groups, etc.).
It's just Rust starts and runs so fast (and Cargo makes it easy and clear like Go); so that being able to re-run periodically really fast is like a REPL. Yeah there's no retained state or ability to keep a REPL running for days, etc. (though Tmux.. and nix as a repl.... more on that later), but it's reached a point where compilation is an OOM faster than before, so the loop of: read, eval, print now can include the compiler.
And you get this amazing boost where if you're operating e.g. on large data (if you're a senior engineer, like Dan Luu blogs https://danluu.com/ https://danluu.com/, you're often scanning codebases or log files or other metadata to answer questions); so being able to tweak and re-run even without caching at OOM faster speeds than other languages is wonderful.
I can create complex refactoring scripts in Rust on GBs of data and constantly re-run them until it's just right.
To my knowledge you can learn the ins and outs of CL or Rust; both fairly specific-knowledge-heavy languages at first (Rust with some syntax, CL with its non-uniformity of functions). It just seems like Rust is the future. It sort of "merges" dynamic languages with REPLs and *nix (with tmux) as the REPL. Pretty exciting.
And if someone wrote a CL-like REPL with something like SLIME/SLY for debugging for Rust it'd be kind of game over. And I could see that coming in the next few years (https://github.com/google/evcxr https://github.com/google/evcxr seems cool, but perhaps the dependency on Jupyter complicates it a bit).