Personal dialects and C++ overloading
Dr A. N. Walker
anw at maths.nott.ac.uk
Wed Feb 7 04:41:39 AEST 1990
In article <4156 at helios.TAMU.EDU> john at stat.tamu.edu (John S. Price) writes:
> [...] It was pointed out to me the other day that
>Bourne used alot of macros to make C look like Algol (I can post
>some of the code if you like.) I would HATE to have to
>maintain that code.
[I don't want to pick on John, he's only one of several posters
who have commented adversely on Bournegol.]
Steve Bourne can defend himself; however, I think some of you
are missing the point. In the late 70s, Algol (specifically, Algol 68)
was the language of choice for many of us old lags, certainly for me,
and I strongly suspect for SDB. C was definitely second best.
What to do, faced with a programming task? Why, you write it
in Algol, of course. Later you try to port that program to a computer
that has no [adequate] Algol compiler, but has C. So, you copy the
source across, write a few macros, try to compile and lint the result,
and iterate into a working Bournegol program. It's not perverted C,
it's perverted Algol. I've done the same with a lot of "dusty decks".
Those who are complaining loudest about Bournegol might like
to think about what they will do if they ever find themselves with lots
of C source on a computer with no C compiler, but with, say, Fortran
available.
Once you are used to Bournegol, it becomes a perfectly viable
language in which it is possible to write useful programs, like "sh"
[:-)].
Over a decade later, most of *my* programs are now written
in C from the start. (Actually, that's a half truth: most by line
count. Most by number are in [Bourne] shell.) Even so, when faced
with a tricky problem involving linked lists, or digraphs, or similar,
I still write the algorithm first in Algol, where it's *much* easier
to write, to prove, to maintain, to understand, and translate into C.
(At least Algol to C is fairly easy; Algol to Pascal is an absolute
pig for these activities.)
>If someone says that they have a program in C that they want
>me to look at, I EXPECT it to be C, not some weird, perverted
>Algol-looking beast.
But C *is* a weird, perverted Algol-like beast! [:-)]
--
Andy Walker, Maths Dept., Nott'm Univ., UK.
anw at maths.nott.ac.uk
More information about the Comp.lang.c
mailing list