Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpcupt1!hpcuhb!hpindda!mintz From: mintz@hpindda.HP.COM (Ken Mintz) Newsgroups: comp.sys.ibm.pc Subject: Re: RFC: MS C v. Lattice C Message-ID: <4330069@hpindda.HP.COM> Date: 29 Apr 88 17:36:18 GMT References: <4330063@hpindda.HP.COM> Organization: HP Technical Networks, Cupertino, Calif. Lines: 103 [I'm posting this without the author's permission, so I've left off the signature. Altho I've appreciated all responses, this is one the most comprehensive so far. -- Ken Mintz.] Is there any particular reason you are even THINKING of CONSIDERING Lattice? [Because I used LC many years ago. My choice of MSC and LC in the basenote was not intended to demonstrate any bias or predisposition, but only my level of awareness at the time. I omitted TurboC as an oversight. -- Ken.] Three or four years ago, it may have been an industry standard, but since then, it has been left completely in the cold by MS, Turbo, Datalight, and others. Before version 3.0, MSC was Lattice, repackaged in a Microsoft wrapper. Starting with version 3.0, Microsoft developed their own C compiler. Starting with version 4.0, Microsoft C took over the "industry standard" title, although they are on version 5.1 now with no real improvement since 4.0 (if anything, it is buggier than ever). So much for broad generalities. Down to specifics: Microsoft supports close to full ANSI specs, Lattice doesn't come close. Some of these features you may never use, but some, like function prototyping, can be indispenisble in large projects. Lattice no longer chokes on function prototype definitions, but it doesn't use them in a useful way (void pointers are not implemented properly, so you get thousands of spurious pointer mismatch warnings when calling library routines, for example). Microsoft's code quality is significantly (double digit percent wise) better than that produced by Lattice. Lattice has, arguably, the slowest compiler available. Microsoft's full optimizing compiler in the same ballpark, but they include Quick C with the package, which compiles at over twice the speed of Lattice. Microsoft's library is much more complete than Lattice. Lattice's library is big, but many of the functions are so specialized (esp. some of the string functions) as to be useless. Microsoft starts with the ANSI library, adds some of the more useful Lattice functions, and has a nice set of DOS and BIOS interface functions which Lattice completely lacks (Lattice has only functions that require you to explicitly set all the register values in a structure, and tell the interrupt number - which makes the function call overhead quite large, and requires you to have a tech ref or Peter Norton book on hand to tell you which interrupt, function number, and registers you want). Microsoft's library also has graphics functions (but they don't do Hercules, alas), which Lattice doesn't have. Microsoft comes with a source level debugger. Lattice sells a pretty useless one separately. MS's codeview works only with MSC, and it does things no other debugger can (such as refer to local variables by name). If you are into integrated environments, MS's Quick C has built-in editor, debugging facilities, etc. MSC supports mixed language programming - so you can call MS Pascal routines from C and vice versa MSC has full support for mixed memory model programming as well. Turbo C (Borland) has most of the features of MSC, with the following differences: - they sell only the fast version of the compiler, which compiles as fast as MS's Quick C, and produces code close to MS's "slow C" (the full optimizing compiler which is several times slower) - it supports in-line assembly if you have MASM; even if you don't, you can assign to and use values of registers directly (pseudo-variables _AX, etc) - the graphics library is standardized with Turbo Pascal 4.0 and other Borland products, and supports Hercules, and can be user extended to support any adapter, and user designable character sets - it is not NEARLY as buggy as MSC; the known bugs all have published fixes on Compuserve (and you get free subscription $15 time when you buy Turbo C) - no debugger, although you can use third party debuggers, including a PD one from Compuserve that was uploaded to the net recently Datalight is another of my favorites. It is almost as fast as Quick or Turbo, produces better code than either, and, when you turn on full optimization (which slows it to MS "slow C" speed) it blows everyone out of the water. Library is kind of weak, but is full ANSI with lots of DOS and BIOS extensions and INCLUDES FULL SOURCE FOR ENTIRE LIBRARY! Previously it was Lattice compatible (you can link DLC and LC object modules), but has recently (the forthcoming version 4.0) jumped ship to the Microsoft convention (Turbo is also MS compatible). Datalight upgrades the compiler every three months or so; for $60 a year you can download latest versions from their BBS, or pay $20 a shot (about half of everyone else's upgrade cost, BTW), or, if you sent in a bug report, you can get an upgrade free. Documentation is kind of weak, (there is no C tutorial or anything like that), but it does come in a three ring binder, and is more than sufficient if you have an average amount of common sense. Datalight C supports most of the ANSI and MS extensions, with the exception of mixed language support (and the mixed memory model support is more limited). Full MSC is over $200, Quick C by itself (doesn't include Codeview debugger, but has some integrated debugging) is about $60, so is Turbo. Datalight is about $90. Library source for MSC and Turbo is available for $150. Lattice is >$200, and source for library is available, but I forget how much it costs (although $150 or so is a good guess). >Pointers to recent reviews in magazines would be welcomed. Seems almost everyone did a C compiler review about a month or two ago. Something called "Micro Cornucopia" or something like that, PC TECH Journal, maybe others. Older reviews (such as one in Dr. Dobb's Journal just of MSC, Turbo C, and Datalight C half a year ago) are worthless by now, as all companies seemed to have released new versions this year.