3 ms·
You don't understand what I'm saying... The likelihood that there are no deadlocks or race conditions in your threaded applications is incredibly low without a
by KirinDave 17y ago
You don't understand what I'm saying... The likelihood that there are no deadlocks or race conditions in your threaded applications is incredibly low without a massive amount of testing. Even experts in the field can mess up and find bugs surfacing years later that they didn't expect. The fact that it's hard to make a non-trivial multi-threaded programs bulletproof is proven both theoretically and empirically.
That's why there is a movement in the software community to consolidate threading portions of the code and boil them down to the simplest constructs that could possibly work. It reduces the debugging load significantly. And that's why a lot of time is being invested developing strategies that are atomic and insensitive to threaded programming, because it lets you sidestep the problem entirely. Functional programming is just the leading edge of this trend, it's already sweeping through the imperative and objective world. Things like Software Transactional Memory and Erlang's thread management are examples of tenable approaches. These approaches are a roadmap of how we can move forward and make truly and clearly reliable threaded programs. Programs that don't have land mines waiting for a 1:1000000 shot to set them off and inexplicably ruin everything.
This isn't about "finding your own way." It's about groping for any handhold as we're about to fall into a dark precipice of totally unmanageable massively-parallel and/or distributed code.
P.S. Haskell only seems harder to you because you're clearly not dealing with all the problems that mutable state brings. It's much easier to ignore something than to learn to deal with it.