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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!c29g2000yqd.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Constant as anonymous functions : the outer space beast is back Date: Tue, 2 Feb 2010 11:34:08 -0800 (PST) Organization: http://groups.google.com Message-ID: <454c900f-85ed-4a40-ad13-a5b432261b99@c29g2000yqd.googlegroups.com> References: <3c43bf9d-75f1-4d09-9388-65b83cafb1d9@j14g2000yqm.googlegroups.com> NNTP-Posting-Host: 77.198.58.180 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265139248 27328 127.0.0.1 (2 Feb 2010 19:34:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 2 Feb 2010 19:34:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c29g2000yqd.googlegroups.com; posting-host=77.198.58.180; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8860 Date: 2010-02-02T11:34:08-08:00 List-Id: On 30 jan, 09:45, AdaMagica wrote: > And even if you make Count a function (overloadable), this example > code is still illegal in Ada as is - and that's a good thing. > > package P is > =A0 function Count return Float; > end P; Yes, because the Count loop variant still hide the one from P. That's the proof there would be no bad side effects to make the =93 equivalent =94 constant overloadable the same way. If it's not good for constants, so why should it be good for functions ? Reciprocally, if it's Ok for functions, why wouldn't it be good for constants ? What's the rational underlying this distinction between constants as functions ? Isn't it just a matter of implementation after all ? I see implementation differences, no any semantic ones (I know some implementation choices have legitimately semantic side effects, but this one should not, unless there are opposite arguments which I do not know about).