3 ms·
I've recently started on Rust. Can someone who knows both Rust and Scala draw comparison on the myths the author is talking about?
by oxplot 11y ago
I've recently started on Rust. Can someone who knows both Rust and Scala draw comparison on the myths the author is talking about?
- steveklabnik 11y agoI don't really know Scala, but... Rust doesn't have inheritance, let alone multiple inheritance. We do have traits, which I assume work similarly, it looks like. On to the ones that are listed under "myths": IDE support is coming along: https://www.rust-lang.org/ides.html https://www.rust-lang.org/ides.html I rarely hear people say that Rust has too many features, or if they do, they're comparing it to a language with a GC. Rust's compiler can be faster, and it's getting better all the time. https://raw.githubusercontent.com/sanxiyn/sandbox/master/rust/time.png https://raw.githubusercontent.com/sanxiyn/sandbox/master/rus... Rust doesn't really have traditional OOP, so yeah, a lot of it does go out the window. Rust doesn't have some Scala features like Higher Kinded Types that lead to this kind of perception, so it's not quite the same. Our type system can be hard for totally different reasons ;). The borrow checker stuff.
- whateveracct 11y ago> We do have traits, which I assume work similarly, it looks like. Rust traits are more like typeclasses. Scala traits more more like Java interfaces w/default definitions and some other things.
- Ygg2 11y agoThey aren't similar. Scala traits can change behavior dependent on the order you specify them. Because they can specify fields and state. Rust traits are as far as I know not like that.