September 22, 1999 | Strong Typing | Slide #11 |
Many spurious errors
Programmers ignore error messages that appear
Proliferation of type-defeating features
Casts (C) (char *)(&f)
Automatic conversions (C)
int i; i = 1.42857; /* Silently truncated to 1 */
Variadic functions (C)
Union types (C and Pascal both)
var u: case tag: integer of 0: (intval: integer); 1: (realval: real); 2: (stringval: array [1..20] of character); 3: (boolval: boolean); end; r : real;
u.intval = 1428457; r = u.realval; { Gack }
Abuse of the separate compilation facility (Pascal)
This proliferation is a sure sign of failure
Next | Copyright © 1999 M-J. Dominus |