|
|
|
|
|
by jhgb
1680 days 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. |
|
> 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... 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.