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: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.180.104.98 with SMTP id gd2mr1279659wib.0.1364344071096; Tue, 26 Mar 2013 17:27:51 -0700 (PDT) Path: p18ni19756wiv.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!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Tue, 19 Mar 2013 22:59:22 +0100 Organization: A noiseless patient Spider Message-ID: 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> <14aijp8ckzahf$.1ilfm1nw6qgyt$.dlg@40tude.net> Mime-Version: 1.0 Injection-Date: Tue, 19 Mar 2013 21:57:29 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="38a7d8e63badbc37d4b5295d05d51fdb"; logging-data="10622"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3RTtegGMiMh4NFjP/QNA9" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <14aijp8ckzahf$.1ilfm1nw6qgyt$.dlg@40tude.net> Cancel-Lock: sha1:lGkjErTs/bqIEOoJ4o1YXIJyo6w= X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: 2013-03-19T22:59:22+01:00 List-Id: Le 19/03/2013 21:45, 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? > It is different in that a subtype does NOT inherit operations, it has the SAME operations as its type. Proof: a fundamental feature of OOP is that you can redefine inherited operations. You cannot redefine operations of a subtype to be different from those of its type. Note also that a subtype is a property of an object; a value has no subtype, only a type. Therefore, it would not be possible to dispatch according to the subtype, since you would not know which operation to use if the controlling operand is a plain value. Now, you can argue that these are all more flaws of Ada - or recognize at last that a subtype is not a different type. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr