C typedef deficiency - (nf)

ucbesvax.turner at ucbcad.UUCP ucbesvax.turner at ucbcad.UUCP
Thu Jun 30 02:41:26 AEST 1983


#R:turtleva:-20300:ucbesvax:4800015:000:2321
ucbesvax!turner    Jun 28 23:28:00 1983

	Who is controlling the definition of the C language?  For years,
I'd say that S.C. Johnson was the main force, with some factionalism
surrounding various issues within the community of original definers. 
Now, I'm not sure.  This language is probably the strongest link between
the Berkeley and Bell UNIX versions.

	C has very much the flavor of an evolving language, even now.
I find it almost intolerably messy in places, although I will confess a
liking for the reasoning behind the construction of arrays of pointers
to functions returning ints.

	typedef is a hack, but at least it gives you a handle on
C's type constructions, once you figure them out.  It hands you back
a small piece of what it is hiding, which is one way for a language
to evolve.  To give away too much can cloud a revelation's uses
with issues of safe packaging--an encumbrance.  To give give away
too little is to add an "ad hoc hack"--a trivialization.

	I think enum types fall into the latter category.  They allow
stronger typing, but in a counterproductive way.  Bit fields are
getting some use, and are even implemented efficiently on some
machines, although I've never seen a convincing argument for the
conservatism of alignment (to the next int, if I recall), or the
reasons against arrays of bit fields.  But they don't nearly defeat
themselves.

	By far the best things to happen to happen to C in recent
years are (1) "flexnames"--longer identifiers, and (2) multiple
use in different struct/union definitions of the same field name.
These two events have something about them of tree roots cracking
the pavement they grow under.  Structure assignment is sometimes
useful.

	Some of these changes are documented in "The C Reference Manual"
which, at our site, has an "appendix" (not marked as such; in fact, no
page number appears) called "Recent Changes to C".  It documents structure
assignment and enum types.  It is dated November 15th, 1978.  No author
is named--although there is an intimation that it is the author of the
PDP-11 C compiler.  I learned of the other extensions by word of mouth.
Or by accident.

	From the hissing embers of what few neurons that I have remaining,
I issue a plea for clarification.  From a reliable source, that is.

	Hissing Only Slightly,
	    Michael Turner
	    ucbvax!ucbesvax.turner



More information about the Comp.lang.c mailing list