[comp.lang.c] efficient C

MRC%PANDA@SUMEX-AIM.Stanford.EDU (04/15/87)

On the other hand, one could reasonably argue that the reasons for writing
in assembler are:
 a) efficiency is of utmost consequence
 b) portability is unimportant
 c) the programmer is skilled in assembler
 d) the boss is willing to pay for highly-skilled and expensive programmers
    who are not easily replacable.

Structured programming or other good programming techniques is not endemic
to any particular programming language.  I can show you an excretionable C
program and a truly elegant, beautifully-structured and efficient assembly
program that does the same function.

If there is an attempt to make C be more than a "RatFor for PDP-11 assembly
language" (as I'm often wont to label it), then I feel it's important to
give the programmer as much definition as possible.  This includes operator
precedence and respecting of parenthesis.  On the other hand, there is
something to be said for having many smaller statements instead of a few
humungous ones.  The latter is certainly easier to read and more condusive
to better commenting.
-------

henry@utzoo.UUCP (Henry Spencer) (04/18/87)

> If there is an attempt to make C be more than a "RatFor for PDP-11 assembly
> language" (as I'm often wont to label it), then I feel it's important to
> give the programmer as much definition as possible.  This includes operator
> precedence and respecting of parenthesis...

To misquote Charles Lindsey:  "c'est magnifique, mais ce n'est pas C".

C already respects parentheses, by the way; the parentheses just don't mean
quite what a Fortran programmer thinks.
-- 
"We must choose: the stars or	Henry Spencer @ U of Toronto Zoology
the dust.  Which shall it be?"	{allegra,ihnp4,decvax,pyramid}!utzoo!henry