comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Type extension with GNAT
Date: 23 Feb 1995 11:31:30 -0500
Date: 1995-02-23T11:31:30-05:00	[thread overview]
Message-ID: <3iid92$sa4@gnat.cs.nyu.edu> (raw)
In-Reply-To: 3ii7sc$ns1@lang8.cs.nyu.edu

>dewar@cs.nyu.edu (Robert Dewar) writes:
>: I disagree with Robert Eachus' complaint about overloading and overriding.
>: The critical point here is that constructors of this type should not
>: be made primitive. THAT's the solution, and that's what we shold teach
>: people to understand.
>
>comar@cs.nyu.edu (Cyrille Comar) writes:
>
>Since this bug will be done and redone by every single Ada95 beginner
>we ought to treat it specially in GNAT. I don't see a significantly
>better error message that would solve the problem so maybe what we
>could do is to add an additionnal message:
>
>    See file "Gnat_Common_Mistakes" paragraph "inheriting functions"
>
>and provide some more detailed explanation on this problem in the
>specified file. How does it sound?

Robert replies:

putting in speerences like this is a mistake unless it is done
as part of an organized system, in other words just doing it for one
message does not make sense. What we should have is a general mechanism
for further information on error messages.

In fact I think the error message in GNAT is highly confusing, it talks
about abstract types, when most people reading it will not even know (or
need to know) what an abstract type is.

I would far prefer an error message that says something

   "function XYZ returns tagged type and must be overridden"
   "provide overriding, or declare original in inner package"

this does not explain the situation, but at least it gives the right
corrective action. Mentioning abstract types seems a mistake to me.





  reply	other threads:[~1995-02-23 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3ib6h2$19q4@source.asset.com>
     [not found] ` <EACHUS.95Feb21141055@spectre.mitre.org>
1995-02-23  3:14   ` Type extension with GNAT Robert Dewar
1995-02-23 14:59     ` Cyrille Comar
1995-02-23 16:31       ` Robert Dewar [this message]
1995-02-28 17:00       ` David Wheeler
1995-02-23 23:32     ` Robert I. Eachus
1995-03-19 22:04   ` "Jim Wall"
1995-03-13 22:22 Michael M. Bishop
replies disabled

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