ack/doc/lint/chap1
1991-09-30 17:58:00 +00:00

35 lines
1,020 B
Plaintext

.NH 1
Introduction
.PP
C [1][2] is a dangerous programming language.
The programmer is allowed to do almost anything, as long as
the syntax of the program is correct.
This has a reason. In this way it is possible to make a fast
compiler which produces fast code.
The compiler will be fast because it doesn't do much checking
at compile time.
The code is fast because the compiler doesn't generate run time
checks.
The programmer should protect himself against producing error
prone code.
One way to do that is to obey the
.I
Ten Commandments for C programmers
.R
[appendix B].
This document describes an implementation of the
.I lint
program, as referred to in Commandment 1.
It is a common error to run
.I lint
only after a few hours of debugging and some
bug can't be found.
.I Lint
should be run when large pieces of new code are accepted by the
compiler and as soon as bugs arise.
Even for working programs it is useful to run
.I lint,
because it can find constructions that may lead to problems in
the future.
.bp