You can add AsParallel to your code, and it will work, as long as you know exactly how the parallelized code is implemented -- in particular whether it has access to any shared mutable memory. Scalability can only be attained if you can forget about the implementation of subcomponents. Both OO and FP let you forget certain aspects of implementation while bringing others to the surface -- OO lets you forget exactly the wrong kind of things when you're trying to parallelize your code. In Haskell there's no way (other than the infamous unsafePerformIO) to "forget" side effects. They are reflected in the type system through monads. This lets you run large chunks of code in parallel without knowing the details of their implementation; their type signature telling you (and the compiler) whether it's safe or not.
4
u/[deleted] Apr 28 '14
[removed] — view removed comment