Multilevel standards

Henry Spencer henry at utzoo.UUCP
Thu Jan 3 05:39:19 AEST 1985


> ...  "Standard" Pascal describes a mimimum language.  So
> minimum that it is not usable.  I probably shouldn't claim that there
> are no production quality standard Pascal implementations, but I don't
> know of one and have never used one.  Because the standard is so
> mimimal, every implementation extends the language to make it usable.
> Because there is no standard for these extensions, they are all
> different.  As a result, programs are not portable and the standard is
> relatively useless.  Can we avoid this trap with C??

The problem with Pascal was that the original language was excessively
minimal.  We *have* avoided this trap with C, since it was in heavy use
for production work long before K&R, much less the current ANSI effort.

> The other piece of this problem is in K&R itself.  Look at the page
> opposite the CONTENTS page, where is says "Copyright 1978 by Bell...".
> This book is almost seven years old!!  Has the language changed in the
> meantime?  Certainly.  Not being a Unix person, can I find out how?

Much less than you think, actually.  A few small additions, virtually
no incompatible changes.  C has been very stable; the age of K&R really
does not show all that much.

> [various] features exist on current (for some values of current)
> Unix compilers.  Which ones?  What other features are out there that are
> going to bite me next week or the week after?
> 
> I look to a language standard to help solve these problems.  What help
> is a standard that simply declares all of these compiler to be standard?

Don't sweat it.  The ANSI standard is *not* going to do this.  In fact,
I'm not aware of *any* language standard that has ever done this.

> And that is the problem I see facing the standard committee.  If you
> formalize K&R, perhaps with some minor updates, you will freeze a
> snapshot of the language that is already badly out of date.  This will
> be useless to a significant part of the language users.  If you make
> more than trivial updates, you will omit a lot of current compilers and
> cause political problems.

I have no doubt that there were political problems, but it would appear
that they were faced and solved.  The ANSI standard is going to be, very
roughly speaking, that of the very latest Unix compilers, plus some odds
and ends.  The result is significantly larger than K&R, and is likely to
make all existing compilers obsolete to some degree.  Since the committee
includes representatives from most of the major compiler producers, it
would appear that this has been accepted by the people who will be hurt
by it.  (If you will be hurt by it and you weren't on the committee, why
weren't you?  ANSI committees are open to anyone willing to make the
investment in time and travel.)

> I strongly believe that the best way to cause improvements in the state
> of the art is to make a two level standard and let market forces work on
> those on the lower level.

Even better, if you can get away with it, is to make a one-level standard
which omits the lower level completely.  This is what we're getting for C.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list