views:

188

answers:

1

After reading this question I just wondered whether it would be a good idea to use Haskell (or other functional programming languages) in mission critical industries.

Apart from Erlang, most languages followed imperative/design-by-contract paradigms (Ada, Eiffel, C++).

But what about the functional ones?

The resulting code would be easily maintainable, stable and lots of potential bugs could be eliminated by their strict type systems at compile-time. Or is lazy evaluation more dangerous than helpful? Are there other security drawbacks?

+4  A: 

I think you could. The language seems well suited for such situations, assuming you trust the compiler enough to use it in mission critical situation.

Remember that in mission critical situations it is not only your code that is under scrutiny, but all other components too. That includes compiler (Haskell compiler is not among the easiest ones to code review), appropriate certified hardware that runs the software, appropriate hardware that compiles your code, hardware that bootstraps the compilation of the compiler that will compile your code, hell - even wires that connect that all to the power grid and frequency of voltage change in the socket.

If you are interested in looking at mission critical software quality, I suggest looking at NASA software quality procedures. They are very strict and formal, but well these guys throw millions of dollars in space in hope it will survive pretty rough conditions and will make it to Mars or wherever and then autonomously operate and send some nice photos of Martians back to earth.

So, there you go: Haskell is good for mission critical situations, but it'd be an expensive process to bootstrap its usage there.

Marcin