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.68.161.163 with SMTP id xt3mr4249874pbb.7.1363391803050; Fri, 15 Mar 2013 16:56:43 -0700 (PDT) Path: jm3ni51997pbb.0!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border5.newsrouter.astraweb.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!news.mi.ras.ru!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: Wed, 13 Mar 2013 10:45:54 +0100 Organization: A noiseless patient Spider Message-ID: References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> <513faaf7$0$6626$9b4e6d93@newsspool2.arcor-online.net> Mime-Version: 1.0 Injection-Date: Wed, 13 Mar 2013 09:44:11 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="be1aa3d3aa23ce0057b85fabcc8ab6cc"; logging-data="5601"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JYlDo2JXxVU7iKnsRUAK2" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: Cancel-Lock: sha1:o+3wGFS46HsPg1ykCqoBQCeg858= X-Enigmail-Version: 1.5.1 X-Received-Bytes: 2572 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: 2013-03-13T10:45:54+01:00 List-Id: Le 13/03/2013 09:49, Dmitry A. Kazakov a �crit : > In Ada subtype > (here subtype is Ada-subtype) operations are inherited per composition with > conversion to the base type which is null for in-arguments and sometimes > range-check of outs (not always, though). E.g. > > F (X : S) = F (S'Base (X)) > > S is a subtype *because* it inherits F. Not at all. In Ada, a type is a set of values. A subtype is the SAME TYPE, restricted to a subset of the values (the "constraint"). This feature does not exist in other OO languages, however it is not a reason to try to force this notion on how a more or less similar effect could be achieved in other languages. A subtype has the same operation as its base type, not copies of the operations as with inheritance. -- 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