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: 103376,9ce095aba33fe8d0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Negative float problem Date: Tue, 01 Nov 2005 12:06:19 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: References: <1130351574.313991.229420@g14g2000cwa.googlegroups.com> <10mspnley7gzu$.1swtj67sv0ldr$.dlg@40tude.net> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1130843179 27449 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Red Hat/1.7.12-1.1.3.2.SL3 X-Accept-Language: en-us, en In-Reply-To: <10mspnley7gzu$.1swtj67sv0ldr$.dlg@40tude.net> Xref: g2news1.google.com comp.lang.ada:6082 Date: 2005-11-01T12:06:19+01:00 List-Id: Dmitry A. Kazakov wrote: >>>Further, parameterless function call is >>>indistinguishable from name. >> >>So? ADL is about *arguments* and does not apply to parameterless >>functions at all. > > But in A.B.C (argument) you do not know whether B is a package, function > name or variable. ADL applies only to unqualified names. The above example does not explain why Ada does not have ADL, because it is not more complicated than what is there in C++ anyway - in particular, with overloaded function call operators and overloaded dereference operators the expression A.B->C(argument) may have many meanings as well and I don't see in what way Ada represents a more general case here. The important thing is that ADL is *not* used in such cases. Let's consider again the original problem stated in this thread. The operator name is unqualified and finding it in the namespace (package) associated with its argument is not a rocket science. It is what the programmer expects. > Some legal code might become illegal, because some invisible before > operations would contribute to overloading. Could you please give an example of such code? Remember that we're considering unqualified names. Note also that ADL is performed *only* when the normal lookup fails (it's an extension mechanism). This means that by adding ADL to the language you cannot break existing code - but you can make some code working that was not working before. For example the code from the beginning of this thread. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/