3 ms·
thanks for doing this two questions: from the perspective of a Scala dev, does Rust have a solid collections library (including persistent structures such as S
by doug1001 9y ago
thanks for doing this
two questions: from the perspective of a Scala dev, does Rust have a solid collections library (including persistent structures such as Scala's Vector type) with mutable counterparts (eg, ListBuffer)?
second, from a quick glance it seems Rust's top-level concurrency model (locks, thread ownership) is the polar opposite of Scala's (Actor-based)--is this correct? Scala's concurrency model (based on Erlang), along with trait-based multiple inheritance, were Scala's initial selling points for me
- logicfiction 9y agoIs actor-based really considered top level for Scala? Akka is still a framework and not in the language itself, I'd argue the core concurrency is Java-based thread pooling enriched with Scala's Future type. That said, I do agree that Akka is heavily favored as the ideal in Scala development as part of Lightbend's take on the Scala ecosystem, and maybe that was mostly your point.
- evacchi 9y agoActors (not akka's) used to ship as part of the standard library. I'd argue it's been the killer app that drove many people in, in Scala's early days. At some point Akka grew bigger and matured so the original actor library was spun off in its own library, basically deprecating it in favor of akka.
- amaranth 9y agoRust doesn't have a good persistent collections library, they're hard to do without a GC. On the other hand, the borrow checker makes it easier to deal with shared mutable data so there is less of a need for it.
- FreeFull 9y agoOn the other hand, just sticking a Vec<T> into Rc or Arc should work well enough for quite a few things.
- staticassertion 9y agoRust has no top level concurrency model. The standard library provides an abstraction over OS threads, and that's about as much as there is. The ownership model is sort of concurrency-model-agnostic. Currently the popular Rust concurrency model is Futures. It won't be the only concurrency model used.