Antti-Juhani Kaijanaho: Safety is the beginning of wisdom, not its endI wrote a couple of days ago about safety in programming languages. A certain comment reminded me that people (even programmers) misinterpret technical terms from the area of programming languages. It reminds me of that old joke about the C programmer who is very hurt when somebody claims that C is not a functional programming language - of course it is functional, our hero says, as it functions perfectly. It also reminds me of a quote Christopher Strachey has been said to have written in the 1960's:
It has long been my personal view that the separation of practical and theoretical work is artificial and injurious. Much of the practical work done in computing, both in software and in hardware design, is unsound and clumsy because the people who do it have not any clear understanding of the fundamental design principles of their work. Most of the abstract mathematical and theoretical work is sterile because it has no point of contact with real computing.
In programming languages jargon, safety is the property of a language that all well-formed programs have a well-defined semantics. That is, in a safe language, programs that the compiler does not reject, do not go beserk (corrupt the stack or heap or otherwise invoke nasal demons). A well-defined semantics might be a forcible halt of the program, which is often not the ideal way of dealing with problems (sometimes it is even harmful), but it is beyond the scope of safety to specify a programmer-friendly semantics for such occurrences. Safety is the minimum requirement, not by any means sufficient for all contingencies.There is a related slogan attributed to Robin Milner:
Well-typed programs do not go wrong.
(Wrong, in this case, is an abstraction denoting nasal demons, heap corruption and other such nasty things.)
2004-05-18T22:22+0300 - /en/programming
Trackback url: http://antti-juhani.kaijanaho.info/blog/en/programming/safety-wisdom.trackback (trackback on rikki / trackback is broken)