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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT 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.106.232 with SMTP id gx8mr1244785wib.2.1364344341079; Tue, 26 Mar 2013 17:32:21 -0700 (PDT) MIME-Version: 1.0 Path: p18ni19770wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin1!goblin.stu.neva.ru!newsfeed.fsmpi.rwth-aachen.de!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Wed, 20 Mar 2013 18:31:29 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <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> <1xg9wka6slgit.1q0leacagdeuv.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1363822291 6429 69.95.181.76 (20 Mar 2013 23:31:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 20 Mar 2013 23:31:31 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2013-03-20T18:31:29-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1xg9wka6slgit.1q0leacagdeuv.dlg@40tude.net... > On Wed, 20 Mar 2013 12:01:25 +0100, J-P. Rosen wrote: > >> Le 20/03/2013 11:04, Dmitry A. Kazakov a �crit : >>>> It is different in that a subtype does NOT inherit operations, it has >>>> the SAME operations as its type. >>> >>> How do you know that they are same? In what sense are they same? >>> >>> But they are evidently not same: >>> >>> procedure Foo (X : out Integer) is >>> begin >>> X := -1; >>> end Foo; >>> >>> when inherited by Positive changes its behavior. > >> They are not inherited! You can call the above Foo with a variable of >> type Positive; Constraint_Error is raised after the call when converting >> back. But once again, it is the same operation that is called by Integer >> and Positive. > > See, same operation applied to same value of same type gives different > result. > > This is called UNTYPED. Sounds right to me; by the rules of your useless definitions, you can clearly prove that Ada is untyped. Since Integer and Positive are names for the same type, with non-type properties involved. Calling this "untyped" makes much more sense than trying to claim some sort of inheritance relationship (which is almost always the case, inheritance is almost never worth the mental energy expended upon it). To me, this just demostrates the worthlessness of your definitions when applied to Ada. Apparently others feel the same way. ... > Inheritance as-is composed with a conversion is relatively harmless when > the constraint is a range. But when the constraint is arbitrary it would > break almost everything and it does. This is a hard mathematical fact, no > LRM or ISO has any authority here. The whole idea of "inheritance" has almost no value in any context. It's definitely not worth the energy that people (including) have put into it. A model where every type started with a clean slate other than predefined operations works just as well. ... > The definition is independent on any language. I don't redefine the > meaning > of Ada-subtype. I translate Ada's definition into the terms of ADT. In > these terms Ada-subtype is a proper type. I disagree that Integer is an "ADT" in the first place. There is nothing "abstract" about Integer or any numeric type (even using the English meaning of "abstract") -- all of the values and operations are known and defined by the type declaration. Calling it an "ADT" seems brain-damaged to me; an ADT in Ada is a private type or an interface or an abstract type -- there has to be something hidden. In any case, this discussion has run its course. So long as you cling to a useless and different terminlogy, we really can't discuss the interesting topics, like the value of Integer'Class. This is a useful idea, but not the way you describe it. If you claim that it has something useful to do with subtypes, you are already so far off the rails that there is nothing to talk about. We're not going to jettison 40 years of Ada education and understanding just to adopt a model that makes Dmitry more comfortable! So I'm done here. Randy.