[comp.sys.mac.programmer] Macintosh 'C' Compilers

mehr@polygon.UUCP (Mark Ehr) (04/06/88)

In the next few months, I will be converting a communications program that I
wrote in Microsoft 'C' (MS-DOS) to the Macintosh.  Does anyone out there have
a preference in compilers?  My first inclination is to use Microsoft, but
I thought I would try to get the opinion of some of you Mac programmers
out there that may have found someone elses compiler that works better.

BTW, can anyone recommend some Mac programming books that go into things like
communications (asynchronous), graphics, using the window interface, etc?

Mark Ehr @ Polygon Network, Incorporated {uunet,isis}!polygon!mehr
Dillon, Colorado

oster@dewey.soe.berkeley.edu (David Phillip Oster) (04/10/88)

1.) Microsoft does not make a 68000 C compiler.

2.) porting from Microsoft to the Mac is easier in LightSpeed C, than it
is in MPW, because Microsoft, the Mac O.S, and LightSpeed C all assume
that an int is 16 bits. MPW assumes 32, and it is a colossal pain.

3.) the 'require prototypes' mode of LSC is stricter then the usage of
prototypes in Microsoft (I've even had it catch bugs in the original IBM
program that the MSDOS compiler just skipped over.)

--- David Phillip Oster            --A Sun 3/60 makes a poor Macintosh II.
Arpa: oster@dewey.soe.berkeley.edu --A Macintosh II makes a poor Sun 3/60.
Uucp: {uwvax,decvax,ihnp4}!ucbvax!oster%dewey.soe.berkeley.edu

cswarren@gershwin.berkeley.edu (Warren Gish;133B Biochem;x3-9219) (04/10/88)

In article <23561@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes:
>2.) porting from Microsoft to the Mac is easier in LightSpeed C, than it
>is in MPW, because Microsoft, the Mac O.S, and LightSpeed C all assume
>that an int is 16 bits. MPW assumes 32, and it is a colossal pain.
No quarrel here, but I find it much more difficult to port code from a
32-bit-int system to a 16-bit-int system than vice versa.  Not only is
there a size change, but there is a loss of precision to be concerned
about.  As an added headache, the micro usually has less memory.

In my opinion, Apple took the far-sided view in establishing 32-bit
ints.  It's the ``natural'' size for the MC68020 and beyond, to paraphrase
K&R.  Having done most of my work in the last few years on VAXen and Suns,
this aspect of MPW C is a breath of fresh air in the micro world.

Do I hear 3 cheers from programmers for OS/2 on the Intel 286? :-)

Warren Gish
IS&T
UC Berkeley
cswarren@violet.berkeley.edu
cswarren@ucbviole.bitnet