Hacker News new | past | comments | ask | show | jobs | submit login

in a nutshell this the counterargument to functional purity: side effects can be done correctly/safely when you have/build the right tools. i'm inclined to agree with it.



It's not really a counterargument so much as another approach. Immutability and purity are still powerful concepts, but you don't need to use them for every single situation in rust.


In Haskell, mutable APIs are available but this is surfaced in the types. The idea is not so much that you shouldn’t have mutability, as that it shouldn’t look the same (and be treated by the compiler the same) as immutability.

Maybe Haskell goes too far in this regard, but Rust is in line with the same way of thinking, because mutability is surfaced and checked at type level.


Mutability is still harder to reason about in many/most cases. I thought that was always the main driver behind pure FP.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: