Path: utzoo!utgpu!water!watmath!clyde!att!ucbvax!CORY.BERKELEY.EDU!dillon
From: dillon@CORY.BERKELEY.EDU (Matt Dillon)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Lattice 4.1 register yuck!
Message-ID: <8806240054.AA12122@cory.Berkeley.EDU>
Date: 24 Jun 88 00:54:36 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 39

>I thought (to an extent) that the idea behind C was that a sufficiently
>simple, machine-oriented language would make optimizers unnecessary,
>since you could specify HOW you wanted things done at the simplest level.

	No.  It *allows* you to get down to the bare bones when you want,
but a programmer would do it only for very critical sections of code, as
it usually makes the code unreadable.

>For example, isn't it reasonable that a compiler should produce better
>code for B than A?
>
>A:  *p = ~mask[column & 15] & *p	B: register int x;
>       |  mask[column & 15] & value;	   x = mask[column & 7];
>					  *p = (~x & *p) | (x & value);
>

	See what I mean?

>Then again, why program in a high-level language at all? :-)

	Portability.  For example, you might wonder why the very first
language available for the MC88000 is C (by Greenhills, in fact)?  Because
with that, one can port just about any UNIX OS to it in less than a month,
the libraries in even less time.  Once you've got that, suddenly thousands
of programs are available without having to be ported at all... simply
recompile and .

	Also, debuggability (is that a word?)

	In fact, one is less likely to make an error coding in a high level
language than coding in assembly, assuming he knows the language of course.

>The point is, compilers shouldn't put their time into making ridiculous code
>resonable; they should spend their time making reasonable code tight.

	It depends what your definition of reasonable code is, doesn't it.
Frankly, I would rather have something that's readable.

						-Matt