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,9b7d3a51d0d8b6ee X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!newshosting.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Extending discriminant types Date: Thu, 20 Nov 2008 10:03:35 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <20081115101632.5f98c596@cube.tz.axivion.com> <26f0cb8c-eb3e-4c0d-85d1-f45e2c1ba4c6@j38g2000yqa.googlegroups.com> <6fcfeaa4-e70c-4f58-aa69-0e5aac145000@x8g2000yqk.googlegroups.com> <49254dd7$0$30232$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1227193415 1596 192.74.137.71 (20 Nov 2008 15:03:35 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 20 Nov 2008 15:03:35 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:rAVC0dv9ovl1hTRJAVeTQQW3Jtc= Xref: g2news1.google.com comp.lang.ada:2713 Date: 2008-11-20T10:03:35-05:00 List-Id: Georg Bauhaus writes: > Just out of curiosity, given > > type T is tagged ...; > type D is new T with ...; > type E is new D with ...; > > what would E'Base be? There seems to be some confusion between "base subtype" and "parent type". E'Base is illegal in Ada 95 and Ada 2005. If it were legal, I suppose it would be the same as E, since for scalar types, X'Base basically means "X without constraints", and E has no discriminants and hence no constraints. I think the original example in this thread confused things by calling the root type "Base". It would be better to say "type Root is ..." in an example like that. - Bob