bit-field pointers / arrays
Garry Wiegand
garry at batcomputer.tn.cornell.edu
Sat Dec 13 13:39:06 AEST 1986
[cross-posted to comp.lang.misc from comp.lang.c]
In a recent article ballou at brahms (Kenneth R. Ballou) wrote:
>... Please, please, *PLEASE* remember the philosophy of C is to provide
>a small, low-level language which would nonetheless put a lot of power in
>the hands of the programmer (and also the other side of the coin, a responsi-
>bility to code in a halfway decent style to keep this power from making a
>total mess). As a result, C can be made to run on almost anything. If you
>want a fine example of language design by committee, look at ADA...
I don't need a committee design, but I do need something better than C (or
"baby" Pascal). I love Simula, but Univacs to run it on are getting hard to
come by, and a Snobol compiler I haven't seen for years. Lisp has some virtues,
but our version is a pig. C++ makes a good start on being a better language,
but I'm not able to transport it trivially (because the system interface
routines are written in C++) and it's not able to do much with basic things
like bit arrays (because of the underlying C compiler).
So: what's wrong with wishing the world were a better place, and discussing
what one might want to have in such a place? And given such a discussion,
isn't it reasonable to argue for your pet idea by establishing that it's
at least *sometimes* rationally related to machine architecture? (After
all, isn't it from PDP-11 machine code that our beloved C originally
acquired "*ptr++" ? :-)
garry wiegand (garry%cadif-oak at cu-arpa.cs.cornell.edu)
PS - Having munged the primeval Unix C compiler once upon a time to make
it produce substantially better code (I got mad at it), I *know*
that compiler writers are an inherently lazy lot.
PPS - Wish I could get my hands on the source for the VMS C compiler -
ach, some of the things it does! - oh, and the BSD one - yuck phooey!
More information about the Comp.lang.c
mailing list