I have read that functional programming is pretty well suited for multithreaded programs given the programming language paradigms it brings (immutability, side effect-free functions). I have also read that multithreaded programs are often non nondeterministic.
Given stakx answer to a similar (but different) question, here is my question:
Can a multithreaded program be deterministic if coded using functional programming languages?
Of course. Any program can be made deterministic. For example,
is deterministic, as it does not affect the universe in any fashion. It is all in the way you order your side-effects. If you have no mutable structures, it is then only the matter of ordering your input-output and interprocess communication predictably. But if you are asking if every functional program is deterministic, the answer is no: the moment your threads communicate or do IO, you need some explicit scheduling to make it work the same each time.