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,67bb3e29a77c25c6 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: pragma Pure (Ada) Date: Sun, 09 Oct 2011 08:34:51 +0200 Organization: Tidorum Ltd Message-ID: <9fctjdFcvgU1@mid.individual.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net /Zscpe6z+DmyZnIIpT23+g0XfA449DYSMXngmUx9qkZWj9UogG Cancel-Lock: sha1:B1ts8EivGGCEeGdJzDFQy371iZw= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 In-Reply-To: Xref: g2news1.google.com comp.lang.ada:21334 Date: 2011-10-09T08:34:51+02:00 List-Id: On 11-10-09 00:54 , Yannick DuchĂȘne (Hibou57) wrote: > Le Sat, 08 Oct 2011 03:37:53 +0200, Adam Beneschan a > Ă©crit: >> So a special rule had to be added to make the language *prefer* the >> "universal access" equality function over any other function. >> >> Hope this helps, > Yes Adam, that help, but raise another question: the choice of the > anonymous access type operator is surprising to me. Why was the choice > of the more specific operator rejected ? There can be several different such "more specific" operators, when there are possible implicit conversions of the anonymous access type to several named access type. Which "more specific" operator should be chosen? > ...the choice of the least specific operator, is > counterintuitive, and unintuitive things may lead to bad surprised and > unexpected behavior (an an error at compile time is always preferable to > an unexpected behavior). The choice of the least specific operator minimizes the number of implicit type conversions, which in my view is good. But I would, perhaps, like to have a compiler switch to warn me when this preference rule is applied, especially if the non-preferred implicit conversions could reach an operator that is not the predefined operator for its type. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .