11 ms·
So Rust is Scala but with some extra complicated additional syntax around borrowing references and generic lifetime constraints.
by mlthoughts2018 6y ago
So Rust is Scala but with some extra complicated additional syntax around borrowing references and generic lifetime constraints.
- steveklabnik 6y agoScala has many features Rust does not have as well.
- mlthoughts2018 6y agoYeah, when reading this I was wondering if Rust has sealed traits like Scala, and also structural typing. The extreme degree of shared syntax and shared semantics with Scala was really surprising to me.
- steveklabnik 6y agoRust does not have sealed traits, though you can sorta contort the privacy system to do similar things if you want. We also do not have structural typing. (Generally; tuples are structurally typed but nothing else is) A lot of Rust’s language people did a lot in Scala. The language’s are pretty different IMHO.
- nobleach 6y agoAs was explained to me, Rust has heritage from OCaml. If one squints, they can even see it still beneath the surface. I hear the original compiler was even written in OCaml.
- steveklabnik 6y agoYes, especially amongst the earliest folks, there was a lot of OCaml, and the original compiler was, yes.
- vips7L 6y agoProbably the reason why I don't like rust. Scala is hell for me. I've been burned by it so many times.
- sireat 6y agoSeeing Scala for the first time seemed this is what happens when Java marries Python. Rust seems like when C++ marries Scala. Disclaimer: I like C, Python and Scala but not a big fan of C++ and Java