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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.stack.nl!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Functions vs constants Date: Fri, 25 Jul 2014 00:05:02 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1406264703 11180 69.95.181.76 (25 Jul 2014 05:05:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 25 Jul 2014 05:05:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:21196 Date: 2014-07-25T00:05:02-05:00 List-Id: "Robert A Duff" wrote in message news:wccegxa9254.fsf@shell01.TheWorld.com... ... > procedure Overloaded(X: Integer); > procedure Overloaded(X: Boolean); > > procedure P is > X: constant Integer := 1; > > procedure Q is > X: constant Boolean := True; > begin > Overloaded(X); > ... > > The above is legal, and calls the Boolean version of Overloaded. > If the X's overloaded each other, it would be ambiguous, and > therefore illegal. This could be fixed with a complicated enough rule. Probably not worth it, but possible (I proposed such in the integrated package delibrations). But I recall that such overloading also could cause an inconsistency (a case where a legal program would do something different after the overloading was introduced). That cannot be tolerated, and I don't think that there was any rule that eliminated that short of not allowing overloading. (I'm not going to try to look up that example since we're definitely not doing this, so I fear this could appear to be FUD.) Randy.