Re:Ask HN: Why is concurrent programming so hard ?
by mbrubeck on Monday August 17, 2009 @11:13AM
(#768246)
A program that use both mutable state and concurrency is nondeterministic: when run twice with the same input, it might produce completely different results (based on the order in which concurrent parts execute).
This is one reason that languages good for concurrency tend toward functional programming or other more-declarative paradigms. By eliminating observable state mutation, you can write concurrent programs that are still guaranteed to be deterministic.
This is one reason that languages good for concurrency tend toward functional programming or other more-declarative paradigms. By eliminating observable state mutation, you can write concurrent programs that are still guaranteed to be deterministic.