4 ms·
Initially my take was Javascript is for quick-and-dirty code, Rust is for beautiful thought-out architectures, and Go is somewhere in the middle. Nowadays I t
by bestouff 7y ago
Initially my take was Javascript is for quick-and-dirty code, Rust is for beautiful thought-out architectures, and Go is somewhere in the middle.
Nowadays I tend to do even quick hacks in Rust.
- winrid 7y agoI've written well engineered code in JS, I think it just requires a lot of discipline because the runtime doesn't help you.
- dan_quixote 7y agoIt's not that it's impossible, it's just that expectations are generally low when it comes to JS code quality.
- winrid 7y agoWho sets their expectations low? :)
- animalnewbie 7y agoI 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.