Re: specifications (was Re: Languages: The Bigger the Uglier)

Dave Lloyd <dave@occl-cam.demon.co.uk>
14 Mar 1996 17:19:30 -0500

          From comp.compilers

Related articles
Languages: The Bigger the Uglier (was: Re: Aliasing in ISO C) rfg@monkeys.com (1996-02-19)
Re: Languages: The Bigger the Uglier (was: Re: Aliasing in ISO C) henry@zoo.toronto.edu (Henry Spencer) (1996-02-27)
specifications (was Re: Languages: The Bigger the Uglier) henry@zoo.toronto.edu (Henry Spencer) (1996-03-01)
Re: specifications (was Re: Languages: The Bigger the Uglier) rfg@monkeys.com (1996-03-10)
Re: specifications (was Re: Languages: The Bigger the Uglier) dave@occl-cam.demon.co.uk (Dave Lloyd) (1996-03-14)
Re: specifications (was Re: Languages: The Bigger the Uglier) bobduff@world.std.com (1996-03-16)
Re: specifications (was Re: Languages: The Bigger the Uglier) jejones@microware.com (1996-03-16)
Re: specifications (was Re: Languages: The Bigger the Uglier) hbaker@netcom.com (1996-03-17)
Re: specifications (was Re: Languages: The Bigger the Uglier) jgj@ssd.hcsc.com (1996-03-20)
Re: specifications (was Re: Languages: The Bigger the Uglier) bobduff@world.std.com (1996-03-22)
Re: specifications (was Re: Languages: The Bigger the Uglier) pardo@cs.washington.edu (1996-03-22)
[9 later articles]
| List of all articles for this month |
From: Dave Lloyd <dave@occl-cam.demon.co.uk>
Newsgroups: comp.compilers
Date: 14 Mar 1996 17:19:30 -0500
Organization: Compilers Central
References: 96-02-226 96-02-308 96-02-327 96-03-016
Keywords: standards

I still don't see why a language standard need be instantly
understandable to any user of the language. In my experience, *most*
programmers have never even seen a copy of the standard let alone read
it. Yet they can still discuss the language with authority. How?
Because most people learn their language from the many published books
(e.g., Harbison and Steele for C, Metcalfe and Reid for F90). These
are the "interpretations by the experts" that have been discussed. So
the standard is more a contract between the language book writers and
compiler writers and only referred to by the real users when these are
in conflict.


As with so many things, we need a hierarchy and I propose:


(1) As formal and precise a standard document as is feasible with
current science.


(2) At least one interpretation book with plenty of examples but less
precise in its description. This could be sponsored by the language
committee (but writers and publishers are usually keen to add such a
book to their catologue). Such a book may be a bit dry and perceived
as formal in its approach, so:


(3) At least one tutorial on the language from scratch assuming no
knowledge of programming at all.


(4) ... and never forget the documentation supplied with the vendor's
compiler which tells you what you can and cannot do in this particular
implementation and how ambiguous constructs are handled. These are a
hidden part of the standard, but the front-line for users.


Too many standards fall half-way between (1) and (2).


And when a language is being developed faster than is being
standardised, I like the idea of extension annexes to the standard as
a mediation between vendors keen to meet the needs of their users and
the committee keen to ensure consistency and portability of the
language. Users are then aware that using a feature from an extension
annex may require recoding in the future, but have some assurance that
the language (rather than the vendor) is going in this direction.


I believe this would help resolve the other problem with languages
(particularly C and Fortran) and that is the gap between the standard
and the folklore of what you can get away with in typical
implementations - in Fortran this can be particularly acute on the
thorny issues of type-checking on arguments to external procedures and
memory organisation with common and equivalence, and on the extension
side, there are many mechanisms for conditional compilation in use,
none standard.
----------------------------------------------------------------------
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.