News for hackers. Stuff that matters.
Re:Rust from 0 to 80% for JavaScript Developers by bobbylarrybobby on Sunday May 01, 2022 @01:06AM (#31222351)
You are correct. I know nothing about how Rust was actually developed, but I'd bet a lot of money that its creators were very big into Haskell. In addition to traits/type classes, Rust has quasi-monads (the Try trait is a fraction of the functionality but ends up being 95% of the real world use IMO) and uses a weaker form of Hindley-Milner that, again, is good enough for 95% of inference. And of course it has sum types and a limited set if Haskell's pattern matching (with the @ syntax to boot).
Re:Rust from 0 to 80% for JavaScript Developers by mplanchard on Sunday May 01, 2022 @06:23AM (#31223739)
It was actually much more heavily inspired by OCaml than Haskell early on. See this comment talking about it, which includes a quote from Graydon on the topic: https://news.ycombinator.com/item?id=24956301

But it’s true that much of the inspiration for Rust comes from functional languages, and the trait system is definitely inspired by Haskell.