I have an option to learn a new language for parallel computing. As a parallel programmer what are the reasons one might want to invest time to learn functional programming for parallel computing?
1 Answer
An important argument for learning one is that operations in a purely functional language does not have side effects.
In this case that means one operation cannot change the state of another parallel operation. That makes it much easier to reason about the behaviour of your program, since you don't need to account for all the possible combinations of states, but rather the input and output of each function.
Some functional languages have both purely functional operations and destructive operations (like Lisp and Scheme) and some have only the former (like Haskell). Which one you choose is dependent on what you are trying to solve.