problems/risks due to programming language, stories requested

Jim Giles jlg at lambda.UUCP
Sat Mar 3 10:27:22 AEST 1990


>From article <1004 at micropen>, by dave at micropen (David F. Carlson):
> [... explicit breaks in the C switch construct ...]
> Dijkstra notes that no programming language can prevent a poor programmer from
> creating bad programs.

He also notes that the choice of programming language can have a strong
effect on the quality of the resulting code.  (His indictment of PL/I
as being similar to flying a widebodied jet with all the windows taped
over and no labels on the thousands of controls was quite apropos.)
This effect of the language choice is mainly psychological - and it
CAN be overcome (which is the main thrust of many of Dijkstra's works).
But, be honest, how many programmers do you know who _really_ construct
their programs abstractly _before_ even selecting their implementation
language?  This is the proper way (a' la Dijkstra) to make sure the
you aren't negatively impacted by the language - you select the proper
language for the job at hand - you don't mangle the job to fit the
language.

Dijkstra's statement, while true, should not be used to excuse poorly
designed language features (as you are trying to do).  A better design
for C would have been _not_ to require breaks after each case and to
provide some other syntax for the representation of multiple choices
on the same case.  It's easy to see these kinds of design errors
in retrospect (C _is_ nearly 20 years old you know).

J. Giles



More information about the Comp.lang.c mailing list