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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Preventing private procedure visibility being made public through extension Date: Fri, 2 Jun 2017 09:31:38 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <4a47e4cd-829c-4451-abf1-82cf60b67706@googlegroups.com> <9cdf04e6-123e-4bd9-b466-77aad00d61bb@googlegroups.com> <62e326e6-dd15-4546-83dc-b1e423327c23@googlegroups.com> <6f2fd92e-d962-4679-ac62-571796f659d7@googlegroups.com> NNTP-Posting-Host: vZYCW951TbFitc4GdEwQJg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:46880 Date: 2017-06-02T09:31:38+02:00 List-Id: On 02/06/2017 03:07, Jere wrote: > It would be nice if Ada provided a more > straightforward way to set a procedure or function as not primitive. I would argue that from theoretical point of view there should be no free operations at all. E.g. all operations must be primitive, dispatching, all arguments and results always controlled. [*]. > I know you can put them in another package (or a subpackage), ... or if you freeze the type by using it (in a non-trivial manner) before declaring the operation. ------------ * A class-wide operation procedure Foo (X : T'Class) would be dispatching on T'Class'Class should you have such object. And in general for each type T there is T'Class. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de