From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,63360011f8addace X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-20 04:47:54 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: gnat: time-slicing Date: 20 Jul 2002 04:47:54 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0207200347.2c61f610@posting.google.com> References: NNTP-Posting-Host: 205.232.38.240 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1027165674 25973 127.0.0.1 (20 Jul 2002 11:47:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 20 Jul 2002 11:47:54 GMT Xref: archiver1.google.com comp.lang.ada:27269 Date: 2002-07-20T11:47:54+00:00 List-Id: Keith Thompson wrote in message news:... > Robert A Duff writes: > [...] > > Note that "erroneous" is an Ada technical term. It doesn't mean exactly > > the same thing as it does in plain English (unfortunately). Look it up > > in the RM, if you like. > > That's one thing the C standard got right and the Ada standard got > wrong. C's term for the same thing is "undefined behavior", which > means pretty much what is says in plain English; the standard defines > it more precisely, but the definition doesn't conflict with common > usage. Ada's term "erroneous" is misleading because the word already > has a perfectly good meaning that's much less specific than the > meaning the Ada standard assigns to it. To me undefined behavior is also a very vague term if we don't think of it as a technical term. Undeefined behavior can reasonably be thought of as encompassing four things in Ada: 1. erroneous execution 2. implementation defined behavior (and hence undefined in the standard) 3. implementation dependent behavior 4. execution that is a bounded error (defined but still considered wrong) I actually like the use of the term erroneous as opposed to undefined, but in any case, the point is that both the terms undefined in C and erroneous in Ada are technical terms. In both cases you will get into trouble if you think of them as meaning just what they mean in English. If you read a language standard, you must be prepared to acquire the technical terms that are used and understand them precisely. If you find that too much of a burden, then language standards are not for you. Now of course a text book or a tutorial is free to use any language it pleases. There is certainly no reason why every programmer should need to know precise technical terms of the standard, and it is unrealistic to think they will. One of the rules we try to follow in GNAT error messages is NOT to rely on the precise meaning of technical terms. For example, everyone who reas the standard carefully knows that the term "package" does not include "generic package". There are many statements in the RM that depend crucially on this fact. But we try to avoid a GNAT error message that uses the word "package" in this formal sense, since informally a generic package is a kind of package in ordinary english. Similarly, what everyone calls a package specification, package spec for short, is in fact NOT a package specification at all in the RM, but rather a package declaration, and there are RM statements that depend on this distinction, but we try to avoid depending on this in error messages (actually internally in the GNAT sources, and externally to some extent, we have defined package spec, which is a term that does not appear in the RM, to mean package declaration :-)