Nick Sabalausky:

>Sad as it may be, most people, and worse still, most programmers, have no 
>qualms about "safety by convention".<

This is an interesting topic, there is a lot to say about it. Bugs and errors 
have many sources, and you need to balance different and sometimes opposed 
needs to minimize them. Some of the sources of those troubles are not intuitive 
at all. In some situations "safety by convention" is the less bad solution.

You are used to C-like languages, and probably you don't see the very large 
amounts of "safety by convention" things they do or ask to do. If you look at 
safer languages (like SPARK, a safer variant of Ada) you see a large amount of 
things you never want to do in normal programs. And I am now aware that even 
SPARK contains big amounts of things that are safe just because the programmer 
is supposed to do them in the right way.

If you start piling more and more constraints and requirements on the work of 
the programmer you don't produce a safer language, but a language that no one 
is able to use or no one has enough time and resources to use (unless the 
program is critically important). This is a bit like the "worse is better" 
design strategy, sometimes to maximize the safety you have to leave the program 
some space to do things that don't look safe at all. Designing a good language 
is hard, even C#, that's one of the most carefully languages around has got 
some things wrong (like using + to concat strings, or much worse 
http://blogs.msdn.com/b/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspx
 ).

Bye,
bearophile

Reply via email to