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: a07f3367d7,735c710b5e547bad X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.39.72 with SMTP id f8mr11570656qae.7.1343789444801; Tue, 31 Jul 2012 19:50:44 -0700 (PDT) Path: a15ni14517852qag.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada 2005 puzzle Date: Sat, 28 Jul 2012 12:37:21 +0200 Organization: cbb software GmbH Message-ID: <2dyx4yaenfz9$.ldh4ahlp469f.dlg@40tude.net> References: <1arp60wtxes8h$.1qs6bt732ztgp.dlg@40tude.net> <030cde76-7435-405d-9f12-ac7f730ecab8@googlegroups.com> <1f9q6vk5z2r3t$.1hayo9rmxfwu7$.dlg@40tude.net> <1agfifqlayl3y.1bp09z5i37ewk$.dlg@40tude.net> <1nnq1oprn6h4f.1s5myl3oupdds$.dlg@40tude.net> <57ed1bca-b503-492c-a3b1-012369484e93@googlegroups.com> <1gt5njrqzprkt$.1f9deqqcwyyuq.dlg@40tude.net> <1g6eygs4wyie8.x1sl1gap1gec$.dlg@40tude.net> <16ft4hb6xzphu.z8f7urnw3xu0.dlg@40tude.net> <50128262$0$6554$9b4e6d93@newsspool4.arcor-online.net> <1x51ztmeo2hll.jtsosl0kzzhi.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.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 X-Received-Bytes: 3463 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-07-28T12:37:21+02:00 List-Id: On Sat, 28 Jul 2012 02:48:43 -0700 (PDT), AdaMagica wrote: > On Friday, July 27, 2012 3:04:12 PM UTC+2, Dmitry A. Kazakov wrote: >> If you cannot derive? Primitive operations make little sense if there is >> only one type. >> >> Abstract types fall short either because you could not have: >> >> type T is abstract ... with private; >> function Create (...) return T; -- Non-abstract >> -- initializes private parts of T, called from the overriding >> >> The stuff just does not make any sense to me. > > I see what you mean. But since no objects of abstract types may exist and > somehow you have to provide the private components of derived nonprivate > objects, the proper Ada way (as intended by ARG, I guess) is child > packages. That changes nothing. An abstract type remains abstract. You can derive a non-abstract (and thus necessarily broken) type from it and expose the latter. And you forgot that this was not intended to work anyway. Because a limited derived object cannot be created this way. Which is so far the authoritative answer. It was the starting point of the discussion that the kludge is useless for object creation. Georg suggested a case of a flat type hierarchy (one type) where it might be used. I answered that with one type you need no primitive operations at all. And if it were just a bit thicker: 1 abstract + 1 concrete it would not work already. So whatever use it might have it is clearly marginal. Introducing an extremely difficult to implement and semantically twisted features for this single case, there must have been mass demonstrations of customers on the streets seven years ago! (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de