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,2a3157e5254b8223 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!newsfeed.freenet.de!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Array slices and types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <5886ab95-8744-4b72-b911-e4cb8889c7e7@d1g2000hsg.googlegroups.com> <1k5uib98w8fgw.bno6vggps1p3.dlg@40tude.net> <48ac6750$0$23587$4f793bc4@news.tdc.fi> <48acfbe8$0$23588$4f793bc4@news.tdc.fi> Date: Thu, 21 Aug 2008 17:46:08 +0200 Message-ID: <7oae0iwhszmm.cazomantciz3.dlg@40tude.net> NNTP-Posting-Date: 21 Aug 2008 17:46:11 CEST NNTP-Posting-Host: 1626080e.newsspool3.arcor-online.net X-Trace: DXC=nBYZlgBKb?b9kIfcjg:0fdMcF=Q^Z^V3h4Fo<]lROoRa4nDHegD_]Re_>gX29:I5`d[6LHn;2LCVn[ On Thu, 21 Aug 2008 07:44:29 -0700 (PDT), Adam Beneschan wrote: > Sorry, Dmitry, but if you'll pardon the expression, you're a little > off-base here. S'Base and S are subtypes of the same *type*. No need to excuse, you are right, I don't see any semantic difference between subtypes of "same" type and derived tagged types. Consequently, I don't think it is worth to further maintain such difference in the language. > They > may be different subtypes (have different constraints), but they're > the same type. You're asking for an attribute that would give you a > different type. Yep, for that matter, tag is merely a constraint put on T'Class. Ada 83 model is capable to incorporate OO! We always knew that! (:-)) > There may be merit in having such an attribute (I > haven't looked into it closely), but calling it 'Base would be a bad > idea. S'Parent might be better. Integer'Parent were Universal_Integer, I guess (:-)) > Niklas is asking for S'Base to be the unconstrained array subtype of > the (possibly constrained) array subtype S. It would still fit into > the definition of 'Base (3.5(15)). I'm not sure why this wasn't > defined for array subtypes, or for any other type that could have > discriminants; offhand I don't see how this would cause any problems. I think that the reason was that S'Base was thought as a very low-level thing, something like the least constrained type of the *same* internal representation. For unconstrained arrays the representation is likely not the same, they might have a dope. For other types nobody seemingly cared. (:-)) IMO, if S'Base need to be extended, then that would require a bit firmer foundation than the above. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de