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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,70414f56d810c10c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.6.6 with SMTP id w6mr953775pbw.33.1316349684909; Sun, 18 Sep 2011 05:41:24 -0700 (PDT) Path: m9ni8918pbd.0!nntp.google.com!news1.google.com!postnews.google.com!l7g2000vbz.googlegroups.com!not-for-mail From: ytomino Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Sun, 18 Sep 2011 05:41:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <9f37b726-d80b-4d24-bf3f-28a14255f7fd@s20g2000yql.googlegroups.com> <86015926-d652-4265-aedd-413312d399f9@dq7g2000vbb.googlegroups.com> <0d272f62-67d0-4905-972c-8a7e912c5531@en1g2000vbb.googlegroups.com> <148cxoyabima2.16mz6xwdph2hj.dlg@40tude.net> <01a1374f-59ab-40be-9e39-0640cb2a513d@n35g2000yqf.googlegroups.com> <1fp2o673mu9az$.d9loz1zbcl0d.dlg@40tude.net> NNTP-Posting-Host: 114.150.108.139 Mime-Version: 1.0 X-Trace: posting.google.com 1316349684 25276 127.0.0.1 (18 Sep 2011 12:41:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 18 Sep 2011 12:41:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l7g2000vbz.googlegroups.com; posting-host=114.150.108.139; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKUARELSC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1,gzip(gfe) Xref: news1.google.com comp.lang.ada:18011 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-09-18T05:41:24-07:00 List-Id: > That is. You want to implement the interface of an access type (X.all is a > part of this interface) by a type which is not access. Yes. > Ada does not allow this, unfortunately. OK. ...If I remove assignment operation like unique_ptr of C++0x, it's possible. > My position is that interfaces of all types must be inheritable and > implementable, including access types, but most people here disagree with > me. I agree with you. I want to make multi-precision Big_Integer, more usable Unbounded_String, etc, too. > But you can have P.Element which is much more comfortable. There is no > reason to expose access semantics if you can avoid it. And smart pointers > are to hide pointers rather than to expose them. If it hides semantics of access type, Ada.Containers.Indefinite_Holders gives good interface. (if reference-counted implementation is provided. but http://gcc.gnu.org/svn/gcc/trunk/gcc/ada/a-coinho.adb is not.)