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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,66bc6b039f1e005d X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Three simple questions Date: 2000/10/11 Message-ID: <39E4A0B5.6A6FEA0E@telepath.com>#1/1 X-Deja-AN: 680220430 Content-Transfer-Encoding: 7bit References: <2BED68CA963D6D55.A78776F656DA0452.75A61ED22116F1B6@lp.airnews.net> <39e2588f.21565740@news.demon.co.uk> <39E2D51E.D0122F20@bton.ac.uk> <39E30759.7A402CB6@bton.ac.uk> <8rv7k9$2kq$1@nnrp1.deja.com> <39E47660.3F85CAF9@averstar.com> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii X-Complaints-To: Abuse Role , We Care X-Trace: newshog.newsread.com 971284536 38.195.186.125 (Wed, 11 Oct 2000 13:15:36 EDT) Organization: Telepath Systems (telepath.com) MIME-Version: 1.0 NNTP-Posting-Date: Wed, 11 Oct 2000 13:15:36 EDT Newsgroups: comp.lang.ada Date: 2000-10-11T00:00:00+00:00 List-Id: Tucker Taft wrote: > Ted Dennison wrote: > > > > In article <39E30759.7A402CB6@bton.ac.uk>, > > John English wrote: > > > I agree completely -- from a safety point of view, something like > > > this is surely essential for Ada 0X... > > > > I'm glad I'm not the only one who feels that way. > > You'll be happy to know that pragmas have been proposed that > allow the programmer to prevent this kind of mistake. See AI-218, at: > > http://www.ada-auth.org/cgi-bin-acats/cvsweb.cgi/AIs/AI-00218.DOC?rev=1.4 After looking over that AI, I think I'd rather see us wait for Ada0XX and fix it "right". They are clearly a bit of a hack, but I'm worried that they will become the permanent solution once they are officially blessed.. Since we already have a keyword to designate dispatching operations without implementations (abstract), it wouldn't be a big conceptual leap to make keywords to designate overriding dispatching operations ("overrides", or perhaps "is new"). The big problem is that leaving the default behavior in a backward-compatable state is undesirable. Perhaps the best solution would be leave the default the way it is, and to also have an optional keyword designating that the routine *cannot* be an override. Then it could probably be left to coding standards to enforce usage of the appropriate keywords (rather than taking the default). This would mesh with the situation we currently have with the "in" parameter mode. The text dismisses the keyword solution above as ugly (and new keywords as "bad"). But the pragma solution is even uglier, as it comes on a completly separate line. Worse yet, the pragma wouldn't appear in the body at all (which is where I went looking for the source of my "bug"). In general I think the proposed pragmas are just a hack to cover what should be a first-class part of the language. I do agree wholeheartedly with the part of the AI that says "Syntax was determined to be too heavyweight a solution for an amendment.". Of course that would make us wait until the next full language revision, whereas pragmas can be applied now. -- T.E.D. Home - mailto:dennison@telepath.com Work - mailto:dennison@ssd.fsi.com WWW - http://www.telepath.com/dennison/Ted/TED.html ICQ - 10545591