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 From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Why no abstract non-tagged types? Date: Wed, 26 Feb 2014 21:55:47 +0100 Organization: cbb software GmbH Message-ID: <42pqaaui60zo$.jmxlk3nevhsn.dlg@40tude.net> References: <90153ba2-ffe8-4696-8459-d81a0f703c9e@googlegroups.com> <2e5f406d-3fd1-4f8b-a1dd-c0c2a196cc94@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: cTj7CVEwmZyjrFPUnpIvWg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Path: border1.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.bnb-lp.com!news.glorb.com!aioe.org!.POSTED!not-for-mail X-Original-Bytes: 2563 Xref: number.nntp.dca.giganews.com comp.lang.ada:185079 Date: 2014-02-26T21:55:47+01:00 List-Id: On Wed, 26 Feb 2014 10:52:31 -0800 (PST), Dan'l Miller wrote: > Please give some Ada202X mock-up of precisely what by-value types and > scalar classes would wisely enable that are inexpressible throughout > Ada2012. None are. See RM 6.2(5) > This is a two-part request: 1) explicitly, the proposed feature/syntax > and There exist several AIs regarding extensible enumerations that could cover abstract enumerations as well, theoretically. If you are interested you can search for them. All were rejected, and rightfully so. In my view the problem can be resolved only if by-value classes were supported. > 2) implicitly, the claim that no portion of Ada2012 can be utilized to > accomplish that feature adequately with a different syntax Depends on the feature. As the subject suggests, the OP wished abstract non-tagged types. That requires the type tag not stored in the type specific object (non-tagged = no tag). Naturally, the tag must be present in the class-wide object in order to support dispatch to the implementations of abstract operations (abstract type has abstract operations). This would make it possible (as a prerequisite) to have classes of by-value types, such as enumerations. > (e.g., > counter-claim: another branch of this thread shows that generic > enumerations sufficiently accomplish the OP's desired abstract > enumerations, hence obviating the need for a 2nd syntax to accomplish the > desired effect). Generics cannot implement abstract enumeration, per definition of abstract type, see RM 3.9.3(1/2). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de