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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,772ae8afc5db35f2 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: Abstract Subprograms of Untagged Types Date: 1999/03/05 Message-ID: <7brero$gb9$1@plug.news.pipex.net>#1/1 X-Deja-AN: 451898519 References: <7bk6gh$6d9$2@plug.news.pipex.net> <7bmgfd$2d3$3@plug.news.pipex.net> <7bp8bk$flc$1@plug.news.pipex.net> <36E04AA7.4CB8F686@averstar.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada Date: 1999-03-05T00:00:00+00:00 List-Id: Tucker Taft wrote in message <36E04AA7.4CB8F686@averstar.com>... [...] |One reason we allow abstract primitives of an untagged type |is because one way to *disable* a particular primitive |that is inherited is to override it with an abstract primitive. Aha! [...] |> and I would like to see the restrictions introduced in the next |> revision of Ada. | |At this point, this seems very unlikely, since someone may |be quite happily taking advantage of the ability to declare |abstract primitives of an untagged type. Accepted. [...] |> things, but they should give a warning (or error) when they can tell the |> programmer has (almost certainly) done something silly. | |Identifying things that are harmless but silly can be difficult |and is probably more trouble than it is worth in most cases. |Identifying things that are likely to cause a run-time error |seems much more valuable. I would agree that good warnings are often hard to encode, and that foolish warnings are as annoying as negligent omissions of warnings. I suspect that it would be useful for a compiler to give a warning under some circumstances, when an abstract subprogram is declared. Do you disagree? If not, would you be kind enough to suggest what situations would be appropriate for a warning? Possibly, for example, whenever the subprogram has no tagged parameter or return type, and none of any of its parameter or return types is derived from a type which has, as a primitive operation, a matching subprogram which is not itself abstract. Perhaps it might be appropriate to include a recommendation of such warnings in a future revision? |-Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ |Technical Director, Distributed IT Solutions (www.averstar.com/tools) |AverStar (formerly Intermetrics, Inc.) Burlington, MA USA ------------------------------------- Nick Roberts -------------------------------------