Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.misc Subject: Re: Check the Arg Count Message-ID: <4906@mimsy.UUCP> Date: Fri, 2-Jan-87 05:07:47 EST Article-I.D.: mimsy.4906 Posted: Fri Jan 2 05:07:47 1987 Date-Received: Fri, 2-Jan-87 18:43:53 EST References: <3214@bu-cs.BU.EDU> <4900@mimsy.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 67 In article <4900@mimsy.UUCP> mangoe@mimsy.UUCP (Charley Wingate) writes: >Barry Shein writes: >>Perhaps [always running lint] should be an extension or option to >>CC commands ... >You still haven't explained why lint as a processor should be logically and >functionally distinct from cc as a processor. What is this, a flame war? Charley, I know you are capable of thinking of this one yourself. How about the *time* it takes to run lint? Remember, you are not compiling on a top-of-the-line Amdahl, but a poor little PDP-11 shared by sixteen other users. It takes 15 minutes to recompile your program after a one line change in a header file. A full lint-style check would extend that to 30 minutes. (Yes, this argument breaks down rapidly when you are running on a top-of-the-line Amdahl . . . unless you pay for CPU time. The point is that this is a historic artifact, yet still, I think, useful---in the right hands.) >The ONLY reason I can see for separating them is so that you don't >have to be confronted with messages telling you that you're writng >tricky or otherwise dubious code. No, separating them gives YOU the *option* of deciding whether to expend computer time checking for tricky or otherwise dubious code. I work on a poor little Vax 11/750 much of the time, and I run lint, but sparingly. I have that choice, and often I am glad of it. (I *still* wish the compiler were faster, even after Donn Seeley and I sped it up by 25%, and even though I ship compiles over the Ethernet to the 8600.) >Students shouldn't HAVE to learn to use things like lint, in my >opinion, because they shouldn't have the option of NOT running >things like lint. This may well be true. On the other hand, I wonder if these students will have any idea what happens in `real world' FORTRAN programs after they graduate. It is a tradeoff: Confuse them now, or confuse them later? (The proper time is `as soon as they can handle it', which is quite difficult to determine---but at this university, likely later than sooner. [Note that a BS in CS is still considered a Trade School diploma, at least by all the employers around here. Some think this sorry state of affairs, but that is not a matter to discuss in this newsgroup.]) >Do you REALLY never ever make a careless mistake and forget one of >the arguments to a routine? And why should this mistake be syntactically >equivalent to deliberately variable length argument lists? I do, but lint catches them. That is one of the reasons I use it. (Not only that, but it has become natural for me to type /* VARARGS */ or /* ARGSUSED */ in front of functions that have variable argument lists, or sometimes do not use some arguments. Others, watching me code, have mentioned that I am just warped. :-) I would not, though, object to a source syntax for variable length argument lists, as opposed to this rather odd commentary syntax.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) UUCP: seismo!mimsy!chris ARPA/CSNet: chris@mimsy.umd.edu