Hacker News new | past | comments | ask | show | jobs | submit login

While at it, could you give a few examples that illustrate how Rust was inspired by Scala proper, and not Haskell / SML / OCaml (which also influenced Scala)?





This page from official Rust website of its influences does not mention Scala. https://doc.rust-lang.org/reference/influences.html

In fact this is the first time I've seen anyone say Scala influenced Rust let alone "heavily". Seems like a stretch


It says here:

https://en.wikipedia.org/wiki/ML_(programming_language)

that ML influenced Rust, Scala, Haskell and OCaml, so that's the common denominator.

However, although Rust wants to be an ML style language all the idioms break because there's no GC.


So I regularly jump between Scala and Rust and it's more a feeling.

In that overall the way option types, pattern matching, FP operations e.g. map/filter, immutability by default and type parameters have been implemented are very similar to Scala. And since these make up a large percentage of the everyday code you write you see the similarity as being larger than maybe it is.


All these are just functional features you find in every functional language though. Rust was highly influenced by OCAML and other ML languages

Hence why I said it was a feeling.

And I think the fact the overall style of the language e.g. braces, semicolon, method signatures, loop handling is so similar to Scala versus OCaml contributes to this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: