3 ms·
Rust isn't really a functional language at all? It's pretty much just an imperative language with some type level features.
by smabie 3y ago
Rust isn't really a functional language at all? It's pretty much just an imperative language with some type level features.
- sn9 3y agoRust has strong functional influences [0] to the point of often being described as an ML with a C-like syntax and manual memory management instead of GC. Like Haskell [1], writing in a higher level style can give the compiler enough information to get you non-trivial performance gains [2]. It's not just an imperative language. It's multi-paradigm and can be written in a more functional style. You can just look at the ML family of languages and see which features Rust has that C/Java/Python don't. [0] https://doc.rust-lang.org/book/ch13-00-functional-features.html https://doc.rust-lang.org/book/ch13-00-functional-features.h... [1] https://stackoverflow.com/questions/35027952/why-is-haskell-ghc-so-darn-fast https://stackoverflow.com/questions/35027952/why-is-haskell-... [2] https://ipthomas.com/blog/2023/07/n-times-faster-than-c-where-n-128/ https://ipthomas.com/blog/2023/07/n-times-faster-than-c-wher...