Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!suitti From: suitti@haddock.ISC.COM (Steve Uitti) Newsgroups: comp.sys.mac.programmer Subject: Re: Turbo Pascal - Am I Nuts? Message-ID: <5870@haddock.ISC.COM> Date: 5 Aug 88 20:59:59 GMT References: <7536@cup.portal.com> <6860013@vx2.GBA.NYU.EDU> <12934@agate.BERKELEY.EDU> Reply-To: suitti@haddock.ima.isc.com (Steve Uitti) Organization: Interactive Systems, Boston Lines: 36 >Have Macintosh programmers forgotten about lint? I've been wondering >why I have to find my mistakes when the computer could be doing it for >me. >On the other hand, I'll choose LSC (TC?) over any system I've used >that has lint. I just don't understand why I can't have both. I use lint *all the time* on UNIX. I've yet to find a lint that matched the native C compiler very well lately. For example, the PDP-11 lint was based on pcc, not Ritchie's C - the native version. On BSD systems or Sys V systems that have flexnames C compilers, lint is still limited to 8 chararcters. Further, I've yet to see a lint library for libc that resembles reality. For all of this, lint is typically useful. Under TurboC, for the PC, one can turn on all sorts of additional error checking. It performs as well or better than the best lints I've used. It doesn't seem to slow down compilation significantly. Therefore, I turn on everything, and use it all the time. If you turn on required prototypes, you find all sorts of things (even though it is a pain to get it all right - once). Porting old highly ported stuff to TurboC from UNIX has actually pointed out undiscovered bugs! Amazing. LSC has an option for required prototypes, which I've only just started to use. So far, it does everything I'd want lint to do. You want to avoid int/long or int/pointer cast portability problems? LSC has smaller ints than long or char *, thus complains bitterly. In summary, having lint be seperate from the C compiler is a bad idea. Having lint libraries that are not used for production is bad. Having prototypes in header files that are used for all compilations is infinitly better. The bugs are caught and found early, rather than never (I don't have time to fix this obvious lint library bug... it doesn't prevent the code from working...). Stephen Uitti