comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: gnat: time-slicing
Date: Wed, 31 Jul 2002 22:28:57 GMT
Date: 2002-07-31T22:28:57+00:00	[thread overview]
Message-ID: <wccado71qhi.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 5ee5b646.0207200347.2c61f610@posting.google.com

dewar@gnat.com (Robert Dewar) writes:

> 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.

Quite true.

However, I think it's a Good Thing to choose technical terms that don't
confuse people, in so far as that is possible.  I don't agree with
Humpty Dumpty. ;-)

There are two points that Ada's "erroneous" is trying to get across:

    - Don't do it; it's evil.
    
    - The program might do anything whatsoever.

Ada's "erroneous" captures the first.  C's "undefined behavior" captures
the second.  Can you think of an English phrase that captures both?

How about "undetected error"?  The "error" part of it captures the
first.  And the "undetected" heavily implies the second.

(Too many C programmers think "undefined behavior" means "experiment
with the current version of your current compiler, and see what it does;
depend on that".)

> 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.

Therein lies danger.  If the textbook uses different terminology, then
people will be confused when they see the RM terminology.  Better to
choose the RM terminology so that it doesn't go "too wrong" when
interpreted loosely.

If programmer 1 walks up to programmer 2, and asks "Is this here thing
erroneous?", it would be Good if they understood each other without
explicitly defining their terms.

>... 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.

I think it's a sign of trouble when the language definition needs to do
that.

> One of the rules we try to follow in GNAT error messages is NOT to
> rely on the
> precise meaning of technical terms.

In most cases, that's a good thing.

>... 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.

That one doesn't bother me so much.  In English, "adjective noun" is not
always a subset of "noun", and people generally understand that.  For
example, a "questionable fact" is not a "fact", a "pseudo intellectual"
is not quite an "intellectual", an "incorrect proof" is not a "proof",
an "illegal Ada program" is not an "Ada program".  Etc.

Surely everyone can see that a "generic elephant" is not a particular
elephant, but is a prototype of elaphantness (elaphanthood?).

> 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 :-)

I like it, and I use term "spec" that way, but this clever obfuscation
wouldn't be necessary if the syntax rules were a little bit more
user-friendly.

- Bob



  parent reply	other threads:[~2002-07-31 22:28 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-15 11:25 gnat: time-slicing Jan Prazak
2002-07-15  8:44 ` Dale Stanbrough
2002-07-15 19:10   ` Jan Prazak
2002-07-15 17:16     ` David C. Hoos
2002-07-15 23:30       ` Jan Prazak
2002-07-16  0:54         ` Jan Prazak
2002-07-16 10:46         ` Lutz Donnerhacke
2002-07-16 11:57           ` Aaro Koskinen
2002-07-16 12:57           ` SteveD
2002-07-16 15:18           ` Florian Weimer
2002-07-16 13:29     ` Marin David Condic
2002-07-17 19:29       ` Jan Prazak
2002-07-15 13:07 ` time-slicing David C. Hoos
2002-07-15 14:56   ` time-slicing Ian Broster
2002-07-15 19:10   ` time-slicing Jan Prazak
2002-07-15 19:10   ` time-slicing Jan Prazak
2002-07-15 19:05     ` time-slicing Anders Gidenstam
2002-07-15 23:30       ` time-slicing Jan Prazak
2002-07-15 20:33         ` time-slicing Darren New
2002-07-16 16:30         ` time-slicing Pascal Obry
2002-07-16 23:05           ` time-slicing Jan Prazak
2002-07-16 21:33     ` time-slicing Robert Dewar
2002-07-15 21:03 ` gnat: time-slicing tmoran
2002-07-16 13:04   ` Jan Prazak
2002-07-16 21:29 ` Robert Dewar
2002-07-17 19:29   ` Jan Prazak
2002-07-17 16:44     ` Pascal Obry
2002-07-17 21:38       ` Jan Prazak
2002-07-17 19:21         ` Randy Brukardt
2002-07-17 22:44           ` Jan Prazak
2002-07-17 19:57             ` Marin David Condic
2002-07-18 18:38               ` Larry Kilgallen
2002-07-20 11:52                 ` Robert Dewar
2002-07-17 19:43         ` Pascal Obry
2002-07-18 18:55           ` Jan Prazak
2002-07-18 17:01             ` Pascal Obry
2002-07-18 17:03             ` Pascal Obry
2002-07-18 22:38         ` chris.danx
2002-07-18  2:50     ` R. Tim Coslet
2002-07-18 12:54       ` SteveD
2002-07-20 11:56       ` Robert Dewar
2002-07-18 12:02     ` Frank J. Lhota
2002-07-19  2:33 ` Robert A Duff
2002-07-19 13:32   ` Jan Prazak
2002-07-19 23:46   ` Keith Thompson
2002-07-20  0:36     ` Robert A Duff
2002-07-20  4:25       ` Darren New
2002-07-20 11:47     ` Robert Dewar
2002-07-21 10:58       ` Keith Thompson
2002-07-31 22:28       ` Robert A Duff [this message]
2002-08-01 19:28   ` Erroneous execution? (was Re: gnat: time-slicing) Ben Brosgol
2002-08-01 22:03     ` Robert A Duff
2002-08-02  3:59       ` Ben Brosgol
2002-08-13 22:30         ` Robert A Duff
2002-08-02  4:17       ` Robert Dewar
2002-07-19  3:17 ` time-slicing SteveD
2002-07-19 13:32   ` time-slicing Jan Prazak
2002-07-19 12:41     ` time-slicing SteveD
  -- strict thread matches above, loose matches on Subject: below --
2002-07-18  4:44 gnat: time-slicing Grein, Christoph
2002-07-18 18:55 ` Jan Prazak
2002-07-18 16:35   ` Sergey Koshcheyev
2002-07-19  1:37   ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox