News for hackers. Stuff that matters.
Re:Why use Rust on the back end? by hardwaregeek on Monday March 20, 2023 @05:39PM (#35239145)
I would emphatically disagree here. The ergonomics of Rust blow any functional language out of the water. The combination of cargo, rust-analyzer, and rustfmt is far better than anything OCaml can offer. Likewise, the choice of modules instead of traits, while probably a "better" design from a language design aesthetic perspective (more compositional, less global), make simple things like printing or checking equality rather difficult. And that's not even getting into compiler errors, package ecosystem, or documentation.

And really, you can see the priorities in how the people driving the language talk about it. In Rust there's a focus on ergonomics. How can we make this easier to use? How can we make the tooling nicer? In OCaml and other languages the focus is almost always on semantics. We have unboxed types like Rust. We have multicore with green threads. We have effects. This is missing the point. I don't care about the features of the language if the language itself is annoying to use. It's like wondering why Slack or Discord won versus IRC. Ergonomics is the answer.

Re:Why use Rust on the back end? by pharmakom on Monday March 20, 2023 @05:56PM (#35239346)
Interesting you came to that conclusion. I liked Rust when I tried it, but it is definitely less productive and ergonomic than F#. Of course the memory overhead in Rust is much more predictable and generally lower, which might be an important factor for you.
Re:Why use Rust on the back end? by momentoftop on Monday March 20, 2023 @06:28PM (#35239736)
OCaml has dune/opam, OCamlfmt and Merlin. I don't know how Rust can blow these out of the water, but would be interested in comparing killer features.

I mean, OCaml's autoformatter just autoformats arbitrary Ocaml files. How do you blow that out of the water?

Re:Why use Rust on the back end? by sophiabits on Monday March 20, 2023 @07:49PM (#35240566)
> In Rust there's a focus on ergonomics. How can we make this easier to use? How can we make the tooling nicer?

rustc’s error messages are _unbelievably_ nice. It’s shocking how much better they are, even compared to other modern languages. Error messages aren’t an arcane invocation that needs to be deciphered—they almost always explain exactly what went wrong, with suggestions for how to fix the issue.

I wish other languages had the same focus on DX that Rust does…

Re:Why use Rust on the back end? by Veliladon on Monday March 20, 2023 @08:33PM (#35240935)
Yes! The compiler is like "hey this won't work because of x, did you want to try y?" and they actually work.