4 ms·
> FP-adjacent languages like rust What does that even mean? Rust is very far from having anything to do with FP. FP implies immutability and heavily shared str
by jhgb 5y ago
> FP-adjacent languages like rust
What does that even mean? Rust is very far from having anything to do with FP. FP implies immutability and heavily shared structures. Rust hates shared structures with a passion, it requires ownership. You have to jump through some massive hoops to get the same benefits of shared data structures in Rust.
- peterth3 5y agoJust seeing this… > FP implies immutability and heavily shared structures FP does imply immutability, but not sure what you mean by “heavily shared structures.” If you’re referring to a type system like Haskell’s then that’s what I meant by “FP-adjacent.” > Rust is very far from having anything to do with FP This thread has a pretty deep rust vs haskell discussion: 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... Clearly, there are some similarities. > You have to jump through some massive hoops to get the same benefits of shared data structures in Rust. Again, not sure what you mean by “shared data structures.” Functional styles work well in rust. You could use only immutable variables with clone/copy sprinkled throughout and the borrow checker won’t complain.