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-Thread: a07f3367d7,16f39b4f57339dcb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!panix!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Constant as anonymous functions : the outer space beast is back Date: Sun, 07 Feb 2010 11:22:20 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <3c43bf9d-75f1-4d09-9388-65b83cafb1d9@j14g2000yqm.googlegroups.com> <454c900f-85ed-4a40-ad13-a5b432261b99@c29g2000yqd.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls6.std.com 1265559729 3368 192.74.137.71 (7 Feb 2010 16:22:09 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 7 Feb 2010 16:22:09 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:tZq4cSxJr/5IJwPe9MfumJfv5OE= Xref: g2news1.google.com comp.lang.ada:8953 Date: 2010-02-07T11:22:20-05:00 List-Id: "Hibou57 (Yannick Duch�ne)" writes: > If it's not good for constants, so why should it be good for > functions ? You're right -- it would make sense to allow overloading for constants. In fact, it would make sense to allow overloading for everything. But you'd want to make the resolution rules weak, so that anything that is likely to be confusing to programmers would be ambiguous and therefore illegal. Ada's resolution rules are too strong as it is. For example: F(...).all := X; I find it odd that the type of X is used to resolve which F you're calling. Another point: implicit hiding is evil. It causes Beaujolais-like effects. Ada 95 makes it worse, because of child packages -- the hiding can cross library unit boundaries. Subunits already had similar problems in Ada 83, but subunits are less useful, and therefore rarer, than child packages. - Bob