Why does Rust lack a useable REPL?

  1. Sorry for keeping on talking about OCaml, but OCaml has quite a decent REPL, to the point one can do "repl driven development."

  2. Rust has https://github.com/murarth/rusti which does not support the latest compiler.

  3. What is the difference between Rust & OCaml that causes Rust to not have a REPL? Is it the Rust language itself (i.e. zero cost abstractions don't work well with REPLs), or is it an artifact of current Rust compilers, or ... ?

1 Like

Check out https://github.com/google/evcxr. The repo seems active.

Btw, MIRI growing more capable, perhaps that could be used as a basis for an interepreter? (from my understanding both rusti and evcxr basically just compile every line to a separate program and do some shared memory hacks to persist variables)


Basically, because it's complicated :slight_smile: This issue has a lot of discussion on some of the issues.