4 ms·
I think this ship sailed when Rust removed function purity. Rust is a Scala, not a Haskell.
by nilved 10y ago
I think this ship sailed when Rust removed function purity. Rust is a Scala, not a Haskell.
- _redwire 10y agoSo I'm actually not super familiar with Scala. I do know Haskell a little bit. Could you elaborate on what you think the implications are for Rust's development down the functional route are? I've heard about the potential for support for higher-kinded types, which makes me think there could actually be a strong incentive to be able to do more functional programming in Rust if people started working on monad implementations and such.
- killercup 10y agoThere was a very nice comparison between the type systems of Rust and Haskell a few days back on reddit: https://www.reddit.com/r/rust/comments/4jh8hv/question_about_rust_vs_haskell_type_systems/ https://www.reddit.com/r/rust/comments/4jh8hv/question_about...
- kibwen 10y agoNah, Scala does support higher-kinded types. :P Rust just isn't an especially functional language, though it may seem that way relative to C.
- tatterdemalion 10y agoThe grandparent was probably referring to the fact that Rust allows mutation and side effects, which Scala also does. "Functional" is not a very meaningful term, but Rust has about equivalent support for higher kinded polymorphism as SML or OCaml (in that there is no first class support but another language feature can be used to implement it), which are certainly functional languages. And of course, many lisps are considered functional languages despite not having types at all.
- pjmlp 10y agoHaving started functional programming with Lisp and Caml Light, with Prolog on the side for logic programming, it feels strange this modern notion that Haskell is the be all and end all of FP.