3 ms·
I do quick stuff in scala because Rust doesn't have a decent repl.
by animalnewbie 7y ago
I do quick stuff in scala because Rust doesn't have a decent repl.
- FunnyLookinHat 7y agoMaybe a dumb question... but how would a compiled language provide a REPL? Isn't a VM of some sort a requirement to provide anything that we'd call a "REPL"?
- ketralnis 7y agoHaskell is compiled and has a decent repl
- rjsw 7y agoLisp is a compiled language with a REPL.
- dnautics 7y agoIt's possible to be both compiled and have a vm, like jvm and erlang (notably, erlang has a repl)
- gnulinux 7y agoREPL stands for read eval print loop. Being "compiled" is not a property of the language, but a property of the implementation. You can provide a "compiler" for python or "interpreter" for C. In Rust's case "eval" part of REPL would do compile->run. Note that even "interpreted" languages such as python are internally compiled (but this is not the output), e.g. cpython compiles python to python-byte-code, and then executes.
- FunnyLookinHat 7y agoAha that's a good way of putting it - thanks! I guess my experience with Go and C has made me only expect REPLs with dynamic languages that use VMs. Some of the other comments also noted that Haskell and Erlang are compiled but also provide REPLs.