C Review

ben at catnip.UUCP ben at catnip.UUCP
Sun Jan 18 12:27:41 AEST 1987


In article <1667 at hoptoad.uucp> gnu at hoptoad.uucp (John Gilmore) writes:
>The reviewer has probably been reading C code written by graduates from
>the 8088 assembler school of engineering.  I hope I'm not the only one
>who noticed the really *low* quality of public domain software written
>in C on (non-Unix) micros.  (Code first written on Xenix tends to look
>that bad too; probably it's written by the same 9 year old kids.)

John, this if both an untrue and absurd statement.  People who have
Intel 80x86 based Unix micros (such as Xenix and Microport) are actually
*more* aware than you 68000 types about portability concerns.  We are
the ones who get bitten when someone assumes sizeof(int)=sizeof(long),
address spaces are huge and contiguous, or make other false assumptions.

>It's taken about 6 months to get a version of "arc" (written in C for
>msdos) to run semi-reliably on machines with different byte order,
>different order of execution, or different word sizes than the 8088.

As a person who ported the recently posted Unix arc sources to Xenix,
let me assure you that many of the portability problems were introduced
by the Unix guru who ported arc to Unix (on a 68000 based micro no less)

* He was the one who broke the squeeze code by hard coding sizeof(int)
  as 16 bytes (sic)

* He was the one who shifted a (possibly 16 bit) integer left 24 bits

* He was the one who ported the coreleft() test (to prevent arc from
  running out of memory) by removing it, and returning "always enough
  core"


+++
+++  The bottom line is that arc, written for the 80x86 processor,
+++  would not run correctly on the 80x86 after it was supposedly
+++  portably converted to work on a 68000.  You couldn't have picked
+++  a worse example to support your claim.
+++

Look, you may not like the Intel architecture. (I sure don't)  But
classifying programmers who program on these machines as '9 year old
kids' is assinine.  Perhaps people who program on Suns and Apollos write
better code (because only professionals can afford these machines), but
there is just as much bad C code written for the Amiga, Atari and Mac
as there is for the IBM PC and AT families.
-- 

Ben Broder
{ihnp4,decvax} !hjuxa!catnip!ben
{houxm,clyde}/



More information about the Comp.lang.c mailing list