comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <Nick.Roberts@dial.pipex.com>
Subject: Re: Getting GNAT to issue ARM error messages
Date: 1999/02/14
Date: 1999-02-14T00:00:00+00:00	[thread overview]
Message-ID: <7a7aat$mse$1@plug.news.pipex.net> (raw)
In-Reply-To: 7a5b71$d25$1@nnrp1.dejanews.com

robert_dewar@my-dejanews.com wrote in message
<7a5b71$d25$1@nnrp1.dejanews.com>...
[...]
|First of all, most *certainly* useless RM references have
|the potential for harm. They can send people off on wild
|goose chases trying to read (to them) incomprehensible
|stuff in the RM which just adds confusion to lack of
|understanding.


Couldn't you just warn users in the GNAT manual not to follow RM references
unless they are Ada experts? (On reflection, I think I can see the answer to
this one: how many users read the manual? :-)

|Once again, the GNAT philosophy is to include the RM
|reference if and only if it is significantly helpful to
|the majority of users.
|

|We do not find many such examples!

This might argue for the inclusion of a compiler flag (do as GNAT now does
by default, but a flag ('-smartass'?) causes references to be added). But,
I'll admit, this might be considered just a tad overkill!

|The argument that extra information should be supplied in
|an error message even if it is only useful to a very small
|number of users is dubious. It would for example equally
|well justify routinely adding a Russian translation of the
|message, along with a dubious RM reference.


A very fair point (badly put :-)[supplying versions of an application
program (and in this sense a compiler is an application program) for
different (human) languages is hard work but usually a worthy exercise].
Plainly, an error message which ran on for seven pages, and included amusing
anecdotes on the relevant subject plus a full horoscope, is unlikely to be
what any user would want.

|Once again, how about a specific example where an RM
|reference would help general users.


Well I (personally) have to admit to being stumped by this one, for the
simple reason that I am not a GNAT user (yet)[I may become a GNAT user in
the future, depending on various things]. I can only report that I myself
have always appreciated those compilers which gave out references to the
approriate sections in their respective manuals. However, I have to admit
that this is not entirely a fair comparison, since the RM95 is not any
compiler's manual (or at least shouldn't be), and I guess I am not a typical
user anyway.

|Nick, you are writing an Ada compiler, that means you know
|the RM backwards and forwards and completely (or you don't
|have a chance), so you are definitely NOT the kind of
|person to whom the error messages are targetted

Point accepted.

Actually, since I am considering using the well-worn trick of putting all my
error messages into a big text file (precisely to make it easier to supply
multi-language versions by simply supplying different message files with the
same compiler), it occurs to me that supplying different versions of the
messages file aimed at different kinds of user could be a practical
possibility.

The problem with this approach, of course, is that, for most compilers,
reading in a big text file every time one compiles is likely to be
unacceptably slow. [OTOH I have the luxury: I'm not actually going to worry
about compiler speed myself (it's not going to be a commercial program).]

However, a variation of this trick might be to factor the messages out into
a separate package (or hierarchy) which simply contained a list of constant
string declarations. [Does GNAT already do this? I shall be downloading the
GNAT sources soon, in fact.]

|(indeed I
|would think anyone knowing the RM that well would not in
|any case need RM references :-)

Still studying like crazy ;-)

|Robert Dewar
|Ada Core Technologis


Nick









  reply	other threads:[~1999-02-14  0:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-08  0:00 Getting GNAT to issue ARM error messages David Peterson
1999-02-09  0:00 ` robert_dewar
1999-02-10  0:00   ` Tom Moran
1999-04-20  0:00     ` Robert Dewar
1999-04-20  0:00       ` Ehud Lamm
1999-04-20  0:00         ` Robert Dewar
1999-02-10  0:00   ` David Peterson
1999-02-10  0:00     ` Larry Kilgallen
1999-02-12  0:00       ` dewar
1999-02-12  0:00         ` Tucker Taft
1999-02-13  0:00           ` Nick Roberts
1999-02-13  0:00             ` bill
1999-02-14  0:00             ` robert_dewar
1999-02-14  0:00               ` Nick Roberts [this message]
1999-02-15  0:00                 ` Jerry van Dijk
1999-02-16  0:00                   ` dennison
1999-02-18  0:00                   ` Alexy V Khrabrov
1999-02-15  0:00                 ` dewar
1999-02-15  0:00                   ` Ehud Lamm
1999-02-16  0:00                     ` steve quinlan
1999-02-17  0:00                       ` dewar
1999-02-17  0:00                         ` steve quinlan
1999-02-18  0:00                           ` robert_dewar
1999-02-19  0:00                         ` Simon Wright
1999-02-17  0:00                       ` Jean-Pierre Rosen
1999-02-18  0:00                         ` robert_dewar
1999-02-18  0:00                           ` Keith Thompson
1999-02-18  0:00                             ` robert_dewar
1999-02-18  0:00                             ` David Brown
1999-02-18  0:00                             ` dennison
1999-02-23  0:00                               ` Chris Morgan
1999-02-17  0:00                       ` Steve Whalen
1999-02-17  0:00                       ` Pascal Obry
1999-02-14  0:00           ` robert_dewar
1999-02-10  0:00     ` dewar
replies disabled

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