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,75f02dbbddbbdc88 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.212.232 with SMTP id nn8mr6430346pbc.1.1323995487859; Thu, 15 Dec 2011 16:31:27 -0800 (PST) MIME-Version: 1.0 Path: lh20ni27138pbb.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Pop function Date: Thu, 15 Dec 2011 18:31:24 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <27517259.83.1323907586856.JavaMail.geo-discussion-forums@yqgn9> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1323995486 15404 69.95.181.76 (16 Dec 2011 00:31:26 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 16 Dec 2011 00:31:26 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2011-12-15T18:31:24-06:00 List-Id: "Jeffrey Carter" wrote in message news:jcdjfs$atd$1@adenine.netfront.net... ... > No, a public interface should never use access types, ever. Hiding those > is what abstraction is about. Any public interface that uses access types > is poorly designed. Geee, even I wouldn't go quite *that* far. There are some cases where you have to have reference semantics (the "Parent" function in Claw is an example), and in those cases ONLY it might make sense to visibly use an access type. Ada 2012 provides "aliased" parameters to force reference semantics, and it's possible to encapsulate the access type so that it can't be abused, so this can actually be done safely. But that is an advanced topic. Randy.