questions from using lint

Steve Schlaifer x3171 156/224 steve at jplgodo.UUCP
Wed May 7 03:01:38 AEST 1986


In article <256 at valid.UUCP>, gelfand at valid.UUCP (Brooks Gelfand) writes:
> 
> I have been programming for many years (over 20) in many different 
> languages, and C is the only language that I can remember that
> has a separate program (lint) to find and report compiler errors in 
> source code. All of the other languages I have used have this function
> built into the compiler. Perhaps because UNIX is a programmers
> system rather than a production system this was felt to be unnecessary.
> In most production systems the programs spend more time executing than 
> compiling; while in a development system most of the time is spent editing 
> and compiling. Thus running lint each time would add to the load
> on the system.

Actually, having lint be a seperate program fits nicely with the original
software tools philosophy of unix.  That is, a program should do one thing
and do it well.  A compiler within this philosophy should compile whatever
you give it so long as it can make sense of it.  A seperate tool (lint in this
case) should exist to point out things that you are doing which are
questionable.  The idea here is that the programs are then simpler to build,
maintain and debug since they each have a simpler function to perform.

For a better discussion of this than I can give see the AT&T Bell Laboratories
Technical Journal of October 1984 (Vol 63, No. 8, Part 2) article by R. Pike
and B. W. Kernighan (Program Design in the Unix Environment).

-- 

...smeagol\			Steve Schlaifer
......wlbr->!jplgodo!steve	Advance Projects Group, Jet Propulsion Labs
....group3/			4800 Oak Grove Drive, M/S 156/204
				Pasadena, California, 91109
					+1 818 354 3171



More information about the Comp.lang.c mailing list