September 22, 1999 | Strong Typing | Slide #9 |
Goal: Compile-time checking of program soundness
Pitfalls
Ignore real errors
Report spurious errors
Pascal Examples
var s : array [1..10] of character; s := 'hello'; { You wish }
{----More, please!---------------------------------------------------}
type string = array [1..40] of character; procedure error (c: string) begin write('ERROR: '); write(c); writeln(''); end;
error('File not found'); { In your dreams } error('File not found '); { You have to do this } error('Please just kill me Mr. Wirth ');
Actually Wirth agrees with this assessment
I expect that he fixed it in Modula-2 and in Oberon (Does anyone know?)
Next | Copyright © 1999 M-J. Dominus |