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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4cb1f8d1c17d39a8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.50.169 with SMTP id d9mr4315066pbo.0.1320251210153; Wed, 02 Nov 2011 09:26:50 -0700 (PDT) Path: p6ni63211pbn.0!nntp.google.com!news1.google.com!news3.google.com!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada 'hello world' for Android; success! Date: Wed, 2 Nov 2011 17:27:07 +0100 Organization: cbb software GmbH Message-ID: References: <8239efcjuw.fsf@stephe-leake.org> <98ca5430-aa52-4e39-b789-70d0dd6adb46@d33g2000prb.googlegroups.com> <824nyrq5p6.fsf@stephe-leake.org> <4eac1ca1$0$7625$9b4e6d93@newsspool1.arcor-online.net> <82mxciogt0.fsf@stephe-leake.org> <4s9hvvnvd44l$.pzu8zi1ndkkp.dlg@40tude.net> <82ipn2ms5p.fsf@stephe-leake.org> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18792 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-11-02T17:27:07+01:00 List-Id: On Wed, 02 Nov 2011 11:59:46 -0400, Stephen Leake wrote: > "Dmitry A. Kazakov" writes: > >> On Sun, 30 Oct 2011 07:32:59 -0400, Stephen Leake wrote: >> >>> In brief, _any_ framework that uses dispatching on class-wide >>> objects needs reference semantics. >> >> Wrong. Reference semantics is required to maintain object's identity. > > Well, yes. What good is a system that does not maintain object identity? Why should it? Most of the objects Ada creates lack run-time identity. Ada also prevents the programmer from identifying such objects. E.g. by X'Access for X without "aliased". > Please rewrite my access_vs_object example, without using reference > semantics. Note that I am explicitly including container cursors as a > "reference type". That is OK, cursor is a referential type, which identities the object it points to. If the cursor is a publicly access type, that is fine to me. Moreover I wished that all cursor types implemented "abstract access interface". > Or show me another real system that has dispatching on collections of > heterogeneous objects without reference semantics. Note that Ada does not have MD. So you just cannot dispatch on the collection *and* the object in the collection. You probably meant a different thing: to dispatch on an element of some collection. The word "dispatch" is irrelevant to identity here, because identity comes from the collection: the element must stay in the collection while the operation is performed on it. Is it so? Or did you mean that it would be impossible to implement a collection of class-wide objects without pointers? This is true, but it does not imply referential semantics. E.g. the objects still could be copied in and out when accessed. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de