[comp.sys.atari.st] Lattice C vers 3.04

pes@bath63.UUCP (05/19/87)

Just picked up my Lattice C upgrade from MetaComCo.  It's now called 'Lattice
C Development System'.  Price for upgrade was 34.50 (pounds) -- probably means
40 dollars more or less.  I confess not to having loaded it up yet, but have
had a bash thru the manual.  A quick summary of differences noted so far:

Manual is about 3 times as thick as the old one.  3 disks rather than 2.

New feature of the language:  'void' type for functions.  'enum' keyword for
defining enumerated data types.  (Is this ANSI, or something?  Pascal
programmers on the standards committee?)  Structures or unions of identical
type may be copied by assignment.  Aggregate arguments to functions may be
passed by value.  Functions may return aggregates (structure or union).

And (I like it) external function declarations may include a specification of
the arg types they expect.  This will be checked against uses of the function.

  (e.g. extern void fprintf (FILE *, char *, );

(which will check the first 2 args and leave you on your own for the rest).

A symbolic debugger is included, which from the docs looks not too bad.
It includes a 'link into memory' facility (driven by commands, or from the
same file you feed the linker) which means you can eliminate the explicit
'link' stage while debugging.  This 'link' is said to be faster than the
'create a standalone module' LINKER -- which is still there for post-debug
use.

The editor is much-the-same editor, except that it claims to do multiple
windowing -- and has mouse support.  I'll probably stick to EMACS.

UTIL.TTP (could anyone make that work) has been replaced by a small set of
standalone programs to perform the various functions.

The 'included' resource editor is in fact K-Resource, which they have
bought or licensed depending which MetaComCo employee you believe.  They
seem to have cleaned up the manual a bit.

The function library has grown incredibly.  I didn't count, their ad says
something like 'over 320'.  These are identified as belonging to one of 6
classes, so you can pick according to your portability requirements.  Classes
are:

   ANSI -- (in proposed standard)
   UNIX -- defined in ATT System V
   XENIX -- defined in Microsoft's XENIX
   LATTICE -- 'Available on any system for which Lattice provide a C'
   GEMDOS -- Like LATTICE, except restricted to systems under GEMDOS
   METACOMCO - 'Well, sort of what you see is what you get'

Appears to include system calls, date/time handling, wide range of file
handling, including 'hierarchy maintenance', e.g. chmod and stuff.

Also an expanded GEM library, which appears to the naive punter (i.e. me)
to have been expanded to include the GEM calls which have been missing from
GEM but are provided by GDOS.

On the other hand, still no b***y ACCSTART for making desk accessories.
(However, they have included the sources for STARTUP.  Might be possible
to get somewhere with that.)

Oh, almost forgot, also MAKE and TOUCH variants.  (I tend to ignore them since
I doubt their value on a system without a hard disk -- like mine.)   And, an
AUTO folder date/time setter -- yet again.

I'll do another blurb after I've played with it a bit.

pes@ux63.bath.ac.uk (Paul Smee) (05/20/87)

** Hold the presses **

Lattice C version 3.04 *does* in fact include an ACCSTART library module.  It's
not mentioned in the manual but is mentioned in a README on disk 1 -- and it's
really there.  (Sorry for the confusion.  My initial entry was based totally on
the manual as I don't have an ST at work, so couldn't look at the disks.)

The editor (ED.PRG) has been vastly improved (not hard) and is integrated with
GEM windows, with some functions (load/save, search/replace, block move/copy
) provided thru the menu line.  The command 'style' remains ~ the same, though.
Still spect I'll stick with EMACS.

The K-Resource is vers 1.1.

The manual appears to claim that the libraries (including maths/floating-point)
has been re-written for increased speed.  One salient fact is that they say
they've changed the way the maths/FP calls work, so that you cannot mix object
modules produced by 3.04 with object modules produced by earlier versions, if
the you've used FP or the maths functions.  (I'll try to whip off a quick
comparison between the new and the previous compilers -- i.e. a mini-benchmark.
However I might not manage it before my rapidly approaching holidays, so if
anyone else wants to do that, feel free.)

pes@bath63.UUCP (05/21/87)

I'm not going to get a 'proper' benchmark done.  Someone else will have to do
that, sorry.  I *did* manage a quick and dirty comparison between my old
Lattice C (3.03.??) and the new one (3.04.01) using a little program which
battered the 'long float' primitives (*+-/) inside a loop.  Compilation and
link time *felt* about the same -- the proggy was really too short for
meaningful measurement of those, though, so I didn't.  The new object was
about 5% shorter than the old one, which I don't regard as significant
enough to draw general conclusions from.  The new program ran about 7 times
faster than the old one (~5 sec as compared to ~33 sec).  (And gave the same
(correct) answer.)

I've now pitched my 3.03.?? compiler so am not in a position to repeat the
tests.

P.S.'s -- As usual, I've got no connections with anyone who might profit by
my liking Lattice C.

My mini-benchmark was designed so that all the computations had to be done.
The speed increase is not some clever optimizer gutting my program.

And, maybe I've misjudged make...
Maybe it can be useful on a hard-disk-less system...