3

I program in Scala. I'm fairly versed.

Now, Rust has caught my eye. It looks good. Like it might be another language I would like to have under my belt.

From time to time, when I want to go crazy with types and still have compile time safety, I run into problems, one of which is type erasure.

Is there much difference between the two? Would it be easier to implement this question in Rust? Does Rust have type erasure?

PS. I hope this question is not too vague. Just want to have an overview of the main difference when it comes to types and generics.

Community
  • 1
  • 1
Anton
  • 2,282
  • 26
  • 43
  • 1
    FWIW, I voted to close as "There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.". A [single one of your points](http://arewewebyet.com/) requires an entire web site to answer, and it would only go out of date immediately if answered here. – Shepmaster Sep 10 '15 at 23:15
  • Fair enough, I guess I was too optimistic/lazy. – Anton Sep 11 '15 at 00:16
  • Perhaps this question should be deleted since it was replaced by https://stackoverflow.com/questions/32546054/does-rust-erase-generic-types-or-not – Iceberg Sep 13 '15 at 16:40

1 Answers1

4

Scala is GC language and has JVM runtime so it can tap into JVM ecosystem (clojure, java, groovy, ...), Rust is well known for it's trademark ownership approach which gives a lot more safety guarantees at compile time. Rest of the differences can be neglected I believe.

om-nom-nom
  • 62,329
  • 13
  • 183
  • 228