Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site ncoast.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!cwruecmp!atvax!ncoast!bsa
From: bsa@ncoast.UUCP (Brandon Allbery (the tame hacker on the North Coast))
Newsgroups: net.lang.c,net.lang.f77
Subject: Re: Converting FORTRAN to C
Message-ID: <531@ncoast.UUCP>
Date: Fri, 4-Jan-85 09:59:45 EST
Article-I.D.: ncoast.531
Posted: Fri Jan  4 09:59:45 1985
Date-Received: Tue, 8-Jan-85 05:18:06 EST
References: <435@ukma.UUCP> <431@ecsvax.UUCP>
Reply-To: bsa@ncoast.UUCP (Brandon Allbery (the tame hacker on the North Coast))
Organization: The North Coast Xenix System, Cleveland
Lines: 35
Xref: watmath net.lang.c:3756 net.lang.f77:209
Summary: 

Having just yesterday sent a response to a message denying that Cuses
contiguous storage, I find myself with egg on my face, having been bitten
by that feature of C that I love to hate:  the fact that the apparent
and real semantics of array declarations are wildly at variance with
each other.  The C compiler goes to great lengths to make 

	int a[5][2];

look like

	a ---->	(a1)	(a2)	(a3)	(a4)	(a5)
		  |	  |	  |	  |	  |
		  V	  V	  V	  V	  V
		(a1.1)	(a2.1)	(a3.1)	(a4.1)	(a5.1)
		(a1.2)	(a2.2)	(a3.2)	(a4.2)	(a5.2)

...but `a' is really a constant and a1, a2, a3, a4, a5 have no objective
existance at all.  This really galls me; why make it look like something
it cannot be?  The pointer model takes up more memory, but has quite
a few advantages over the block data (forgive me, ForTran-ers! :-) model.
I would prefer that, consistent with the rest of the pointer/array equi-
valency, array[][] were REALLY equivalent to **array.  The latter is
used more often (strings) anyway.

It's too late to save C.  I'm still working on a C-like language which
uses my idea of pointers/arrays.  (Unfortuantely, our lex has shown a
regrettable tendency to core-dump for no reason at all, and generated
programs (if it doesn't coredump) also usually dump core.)

--bsa
-- 
  Brandon Allbery @ decvax!cwruecmp!ncoast!bsa (..ncoast!tdi1!bsa business)
	6504 Chestnut Road, Independence, Ohio 44131   (216) 524-1416
    Who said you had to be (a) a poor programmer or (b) a security hazard
			     to be a hacker?