65 ms·
I like the expressiveness of Rust in theory, but for the programs I write I don't feel like I get sufficient payoff for fighting the borrow checker, as compared
by doteka 8y ago
I like the expressiveness of Rust in theory, but for the programs I write I don't feel like I get sufficient payoff for fighting the borrow checker, as compared to writing in Go. Would I be correct in saying OCaml is pretty much Rust without the borrow checker? I have no prior experience with the language.
- lmm 8y ago> Would I be correct in saying OCaml is pretty much Rust without the borrow checker? Yeah, it's very much on those lines, though the syntax is a bit more ML-style (Rust pushes a bit towards a C-like syntax). (I actually mostly use Scala myself these days, but I know the JVM is a dealbreaker for some people, and the design compromises for the sake of Java compatibility mean Scala is probably not the best choice for a first ML)
- a0 8y agoIf you want something closer to Rust, consider looking into Reason. It’s essentially OCaml with braces and semicolons.
- petre 8y agoDlang is also very nice if you like Algol style languages. You can get productive in it pretty fast, just like in Go, but it's expressive, it's garbage collected by default and you don't waste time fighting the compiler. Also the code compiles as fast as Go with DMD and LDC. I havent tried GDC. https://tour.dlang.org/ https://tour.dlang.org/
- ben-schaaf 8y agoPlus you get templates and CTFE, which are both awesome. Though if you're doing web stuff I've found D compile times to not be so great anymore, especially when diet templates get into the mix.
- steveklabnik 8y agoRust was originally described to me as "OCaml + C", so there's some truth to that. The language has strayed a bit farther from OCaml in many ways. I really like OCaml, and you should learn it, but you should also know that concurrency is not a strength of it. It's being worked on...
- a0 8y agoSingle-process concurrency is great in OCaml. It’s flexible and composable with libraries like Lwt and Async. On the other hand true multicore backend is where the most work is moment. For the latest update on that see: https://discuss.ocaml.org/t/ocaml-multicore-report-on-a-june-2018-development-meeting-in-paris/2202 https://discuss.ocaml.org/t/ocaml-multicore-report-on-a-june... (Tl;dr: It will be officially merged in 2019.)
- steveklabnik 8y agoYes, I should have said parallelism, my bad. I hope that it does get merged soon, people have been waiting quite a while, in my understanding. It’s a tough problem.