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,c8fd02a2b1be456a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-23 08:31:30 PST Path: nntp.gmd.de!stern.fokus.gmd.de!ceres.fokus.gmd.de!zib-berlin.de!fu-berlin.de!news.dfn.de!scsing.switch.ch!news.rediris.es!news.uoregon.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!news.moneng.mei.com!hookup!news.mathworks.com!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: dewar@cs.nyu.edu (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Type extension with GNAT Date: 23 Feb 1995 11:31:30 -0500 Organization: Courant Institute of Mathematical Sciences Distribution: usa Message-ID: <3iid92$sa4@gnat.cs.nyu.edu> References: <3iguhr$ai4@gnat.cs.nyu.edu> <3ii7sc$ns1@lang8.cs.nyu.edu> NNTP-Posting-Host: gnat.cs.nyu.edu Date: 1995-02-23T11:31:30-05:00 List-Id: >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.