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,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.180.98.103 with SMTP id eh7mr1241929wib.3.1364344077485; Tue, 26 Mar 2013 17:27:57 -0700 (PDT) Path: p18ni19758wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Tue, 19 Mar 2013 21:45:23 +0100 Organization: cbb software GmbH Message-ID: <14aijp8ckzahf$.1ilfm1nw6qgyt$.dlg@40tude.net> References: <1xqmd3386hvns.1og1uql2cgnuf$.dlg@40tude.net> <5140b812$0$6575$9b4e6d93@newsspool3.arcor-online.net> <5140f1ad$0$6634$9b4e6d93@newsspool2.arcor-online.net> <7jct0noryc1v.1rnj5kkzx6m35.dlg@40tude.net> <5141c499$0$6642$9b4e6d93@newsspool2.arcor-online.net> <18r2kop6fyozu.tctrjnghfxqs.dlg@40tude.net> <1wv3p3nrtejfk$.bwebhg9agt0l.dlg@40tude.net> <514874d3$0$6628$9b4e6d93@newsspool2.arcor-online.net> <1o60gooo8xvba$.1ei9cebb07zek$.dlg@40tude.net> <514897bd$0$6641$9b4e6d93@newsspool2.arcor-online.net> <1oqwvcemo8dha$.hevuedtz8eze.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: XRUMb5xlbonTNodERpEXEw.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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2013-03-19T21:45:23+01:00 List-Id: On Tue, 19 Mar 2013 21:07:18 +0100, J-P. Rosen wrote: > Le 19/03/2013 18:31, Dmitry A. Kazakov a �crit : >> Subtype is a type that inherits some operations (interface) of another >> type, called "parent type," "base type," "ancestor type" or "supertype." > > This may be the source of the confusion. What you describe is called > "subtype" in other languages, but this is called "derived type" in Ada. > An Ada subtype is a completely different beast, that does not correspond > to this definition. And how is it different? > And please, bear in mind that other languages do not have anything > similar to Ada subtypes, therefore you cannot compare Ada subtypes to > features of other languages. Practically all languages have subtypes which share the representation of the parent while adding a constraint. E.g. const T in C++ is such a subtype. Of course insistence on keeping the representation erodes the principle of separation interface and implementation. Ada would be much better off if all derived types could change the representation like arrays do when constrained. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de