[comp.sys.acorn] Language war take#?

kortink@utrcu1.UUCP (Kortink John) (03/04/91)

A final few words on the language-war.

Everybody who is fanatic about a single language (most people seem to like C),
i.e. uses it exclusively, is certain to be blinded by this fanatism. Looking
at the messages that appear on the subject, it seems to me that although every
fanatic programmer (whatever language) *knows* that there are speed/space
gains in writing in machinecode, somehow they just cannot seem to accept this
as a fact of life.

I hope I'm being more objective in accepting that, for example, writing in C
has many advantages over writing in assembler. I'm not an 'everything in ARM
code' fanatic for that matter (well, close). I have programmed in C, Pascal,
Algol 68, Simula, Prolog, APL, BASIC, Smalltalk, LISP, etc.. All have its
virtues.

But once a piece of code is written in efficient machinecode, and enough
thought has been been put in the algorithms to use, it will *always* tie and
999 times out of a 1000 beat the C equivalent for speed and size. This simply
cannot be argued, as C (or any other language) itself produces/executes in
machinecode. Given plenty of time, then if your C beats your machinecode,
your machinecode skills are less than perfect, and you're probably right in
using C !

Also, there are *no* compilers that have the intelligence to say to you that
you are using a bad algorithm, and change it for you. If there were any, there
would probably be no need for programmers. Compilers can only optimize the code
they generate *themselves* to execute your program's semantics.

"The smallest/fastest code will always be machinecode"

*After* recognizing this, choose any other language if you like its advantages.
And, if you can, stop worrying that you can do better in machinecode. It may
not be relevant, other things may be.

John Kortink

-----------------------------------------------------------------------------
Student of Informatics at the University of Twente, The Netherlands
MAIL : kortink@utrcu1.uucp
DISCLAIMER : you know ....             "It's a one time thing
                                        It just happens
           Suzanne Vega ('Cracking')    a lot"
------------------------------------------------------------------------------

Gavin.Flower@comp.vuw.ac.nz (Gavin Flower) (03/04/91)

********* "C" is much faster than machine code !!!!!!!!

This is fairly obvious, but to demonstrate:

Define a medium size project, such as a payroll system for 20 people.

Find 2 good project leaders (:-> this might be a  slight problem!)

Select 5 people at random teach them ARM assembler and then
use them as programmers to do the project.  It might help to
throw in a bit of training about analysis and design.

As above, but with "C".

The project which uses "C" is the the one most likely
to produce a usable working system first.

There seems an excessive preoccupation with program execution times.

In "real" life the main factors are usually
the total cost of the project (includes labour costs)
and the elapsed time taken between requesting the system
till the user has a working system (business viability
may be affected badly by delays in being able to use the system).
- or in the case of a software house, revenue depends on sales of
actual systems delivered :-> assumes sensible customers)



-- 
                - Gavin 
---------------------------------------------------------------------------
When people start realizing that health of society is
directly related to the way children are brought up,

kortink@cs.utwente.nl (John Kortink) (03/07/91)

In article <1991Mar04.025851.718@comp.vuw.ac.nz> Gavin.Flower@comp.vuw.ac.nz (Gavin Flower) writes:
>********* "C" is much faster than machine code !!!!!!!!
>
>This is fairly obvious, but to demonstrate:
>[...]
>The project which uses "C" is the the one most likely
>to produce a usable working system first.

You people just *can't* seem to *read*. I do not and have never argued
this. And still this comes up for the *th time.

John Kortink (kortink@cs.utwente.nl)

charlesw@p4.cs.man.ac.uk (William Charles.) (03/08/91)

I suppose I should add my views to this slightly ridiculous debate...

a) Assembly language runs faster than C.
b) A C program takes less time to write then an assembler version, and is easier
   to maintain.

Any programmer knows the above, but I feel I have to fall on the side of the
assembler hackers out there - If a job's worth doing, it's worth doing properly.
Just look at Acorn DTP and CC's Impression II.

Acorn DTP - Quickly hacked up in C,
            Large object code,
            Slow and bl**dy annoying to use on a 1 meg machine.

Impression - Written in assembler,
             Small object code,
             Runs like sh*t of a shovel, and a delight to use even on my 310.

OK Impression took ages to appear (And is still buggy), but wasn't it worth
the wait?

Assembler rules OK - Real programmers don't eat quiche...

Will, :-).