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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Prefixed notation for non tagged types Date: Sun, 17 Dec 2017 16:33:40 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> <3df6404a-588d-4e2d-a189-1d1e32ce9f5d@googlegroups.com> <73b4a9bd-1f3b-42b9-9ef7-5303b0a88794@googlegroups.com> <427478f8-298f-49b3-9cc1-4cfd58da6bd4@googlegroups.com> NNTP-Posting-Host: sWq1fEaAu/L5fGxxOY76vQ.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 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.2 Xref: reader02.eternal-september.org comp.lang.ada:49504 Date: 2017-12-17T16:33:40+01:00 List-Id: On 2017-12-17 16:06, Simon Wright wrote: > I don't understand why prefixed notation should be limited to private > types that are completed by records? Yes, it looks like a simple syntax sugar that the programmer should be able to enable for any subprogram and any argument of. > Naturally, I wasn't involved in any ARG discussions about this (not > being a member!), but I'd have thought the ideal would be for any > derived type (which includes private types, I think?) to be a candidate. Certainly not the way of ARG's thought, but in classic OO prefix notation comes from the [wrong] idea that a method is an object's member. Thus the notation can be seen as an implementation of a record interface X.F where F is naturally dispatching. This in Ada leads to tagged types and their primitive operations. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de