comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Compiler error messages
Date: 1998/01/23
Date: 1998-01-23T00:00:00+00:00	[thread overview]
Message-ID: <dewar.885558591@merv> (raw)
In-Reply-To: 01bd278c$bea48680$9dfc82c1@xhv46.dial.pipex.com


Some other points that Nick makes

  <<I do think there are a lot of things that compilers can do to help users.
    Always making reference to the appropriate section(s) of the manual, for
    example (something that precious few compilers actually do -- why???).>>

Let's assume "the manual" means the Ada RM in this case. Indeed many Ada
compilers do make RM references. We very deliberately decide in GNAT not
to except in a few unusual cases. Our reasoning is that for expert users,
this is unlikely to be necessary, since you know the language and you know
what is right and wrong. For naive users, going and reading the RM tends
to add confusion on top of confusion.

Yes, we know all the arguments on both sides of this issue. No need to
rehash them. If you want, go to DejaNews, there have been long threads on
this issue before. Many people agree with us, some do not. Many people
comment that they like the error messages in GNAT (it was certainly for
example one of the reasons that the Air Force academy chose GNAT over other
competing compilers for teaching Ada). We think this is at least partly a
reflection of the fact that we are forced to try to come up with a
clear error message without relying on the RM reference for an explanation
(that often is inaccesible to beginners).

As I say, the interesting thing here is not general discussions but
particular examples. Interestingly, when we challenge people who think
that RM references are a good thing to come up with specific examples
where an RM reference would help, we have got virtually no input (that
does not surprise us!)

  <<Other ideas are: it is occasionally helpful for the compiler to
    report how long it took to process each file, and usually this
    is very easy to do>>

Does not seem very useful to me, though it would be useful to program. You
can find out how long you spend in each phase of gcc, using the standard
gcc option. (read the gcc manual, it has lots of useful stuff!)

  <<Something that most compiler writers could provide which would be extremely
    useful to their users -- [extremely odd ethnic reference removed] --
    is to provide a section in the manual which discusses each
    error (or those where it would be useful) in some detail.>>

Actually we don't think a section of the manual as such is the right
solution here. We have a design for this, it is a program called GNOME
(Gnat On-line error Message Explanation). THe idea is to bonk on an 
error message from your editor or IDE or whatever, and you get a menu
pointing to a full explanation of the error, cross linked via huper
text to the RM, Rationale, and whatever other useful reference materials
are around.

Isn't that a nice idea?

Unfortunately all we have in place so far is the great name, and since
error messages are pretty good in GNAT, it is not something that is on 
the top of the priority list.

Our users don't complain about error messages. In fact we would like them
to complain more, or at least send in constructive suggestions. "I know
this is wrong, but it seems the error message could have been more helpful"
are useful reports for us

Robert Dewar
Ada Core Technologies


  
  







      parent reply	other threads:[~1998-01-23  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01bd278c$bea48680$9dfc82c1@xhv46.dial.pipex.com>
1998-01-23  0:00 ` Compiler error messages Larry Kilgallen
1998-01-23  0:00   ` Robert Dewar
     [not found] ` <En96AJ.JxL@world.std.com>
1998-01-23  0:00   ` Nick Roberts
     [not found]     ` <EnAqpo.2oJ@world.std.com>
1998-01-24  0:00       ` Nick Roberts
1998-01-23  0:00 ` Robert Dewar
1998-01-23  0:00   ` Nick Roberts
1998-01-23  0:00 ` Robert Dewar [this message]
replies disabled

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