[net.lang.c] C: is it just another descendant of ALGOL?

bet@ecsvax.UUCP (03/12/84)

A recent article chastised one of the "C freaks" on the net for expressing
his elitist views -- I recall phrases along the lines of "C is not inherently
superior to PASCAL or one of the other languages, and any decent compiler
lets you turn off (slow) run-time error checking" or some such. Though it
might be unwise to rise to such provocation, I must say I *do* think C is
different in kind from other ALGOL-descended languages. C was created with a
specific machine model in mind, and the intention that ON MACHINES CONFORMING
TO THAT MODEL all language constructs would be extremely efficient to implement
at the machine level. This makes it intrinsically fast, both in compilation
and at run-time. The discussions in net.lang.c about problems in the definition
of C seem largely to relate to machines that DON'T CONFORM TO THE MODEL! In
particular, C is designed for a BYTE-ADDRESSED machine (re: NULL parameter
to function problem) with a few registers, and special machine-language
opcodes to make certain operations efficient -- operating with zero, pointer
indirection, and so forth. This is not to say that ambiguities don't need to
be cleaned up, just that these problems derive from pushing C beyond its
designed environment.

These aren't my personal ferbile imaginings, but are extracted from some
document or another in the UNIX* Programmers Manual -- one of the short C
discussions.  If you need a more detailed reference, let me know and I will
try to dig it out.

Please *mail* flames to me, unless you are really certain you need to discuss
your points in the public forum of the net.
					Bennett Todd
					...{decvax,ihnp4,akgua}!mcnc!ecsvax!bet

rcd@opus.UUCP (03/14/84)

<>
 > ...I must say I *do* think C is
 > different in kind from other ALGOL-descended languages...
C isn't really an ALGOL-descended language.  Its grandfather, BCPL, is an
interesting language, quite unique in a number of respects.  (Consider that
an untyped language won't let you have polymorphic operators...)  Among
other things, BCPL is untyped, which explains the fact that C may look as
if its sense of data typing is evolving.  In order to understand C, it is
useful (tho not necessarily sufficient) to understand BCPL.  Literature
discussing BCPL is a little hard to find - I'm guessing that it was
something developed by/for people who DO software rather than TALK about
it.  But look under Martin Richards, probably in the late-60's/early-70's
time frame.

One of the interesting aspects of BCPL is that the language and its
compiler were both designed to be portable - it was one of the earliest
reasonably-successful experiments in a portable SIL.  This puts the
following comment in a curious light:
 > C was created with a
 > specific machine model in mind, and the intention that ON MACHINES CONFORMING
 > TO THAT MODEL all language constructs would be extremely efficient to
 > implement at the machine level...
Also compare, from the beloved blue&white C book (Kernighan & Ritchie) the
statement that C "...is not tied to any particular hardware or system..."
It certainly helps to have a byte-addressable machine, of course, though
even that isn't necessary.  I think that C deserves a lot of credit for
generality...
-- 
{hao,ucbvax,allegra}!nbires!rcd

gurr@west44.UUCP (Dave Gurr) (03/16/84)

In response to the mention of BCPL, some people may find the following
references helpful:
	"BCPL, the language and its compiler",
	au: Martin Richards, Colin Whitby-Strevens
	pub (in UK): Cambridge University press 1979
(A tutorial introduction to BCPL)

	"BCPL: A tool for Compiler Writing and Systems Programming"
	au: Martin Richards
	pub: Proceedings of the Spring Joint Computer Conference AFIPS '69 v34
(The original reference to BCPL)

	"UNIX time-sharing system:- The C programming Language"
	Periodical: Dr.Dobbs' Journal of Computing Calisthenics & Orthodontia
		    Vol 5 No 5 pp20-29
	au: D.M. Ritchie, S.C. Johnson, M.E.Lesk, B.W.Kernighan
	pub: May 1980
(A light-hearted history of UNIX and C)

If anyone is really interested in BCPL, then contact me for a more complete
list of references, or alternatively, the UK BCPL Users' Group at:
	{ENGLAND}!ukc!rde (R.D.Eager)

Hope this is of some interest to someone!
{ENGLAND}!ukc!west44!westf!gurr
{ENGLAND}!ukc!west44!gurr
{ENGLAND}!ukc!lmcl      <- by far the quickest, but please ask for the item
                           to be forwarded.