Friday, 2 September 2011

Multi-threaded programming and Mercury

Multi-threaded programming is hard. Really hard, like "shoot this camel out of a canon through the eye of that orbiting needle". Getting it right is nearly impossible and getting it wrong is often independent of your skill. Besides wrapping your head around the concepts, you will spend many hours wracking your brain trying to figure out what's going wrong, how and where there might be conflicts, mistimed events or other problems. That's why I was so interested to hear about Mercury, a declarative programming language with all-explicit state, one of whose side-effects is the ability for the compiler to figure out the best way to do multi-threading. That's exactly what multi-thread programming needs. The added complexity probably does mean that a whole new language and programming model is what we need to solve the problem. Yes, it's a big change. Yes, it means rewriting your programs if you want to take advantage of it, but aren't you spending that time doing so anyway? Mokalus of Borg PS - There are lots of interesting alternative languages out there. PPS - And this one's not even that new.

No comments: