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,UTF8 X-Received: by 10.180.92.202 with SMTP id co10mr1295183wib.1.1364344861617; Tue, 26 Mar 2013 17:41:01 -0700 (PDT) Path: p18ni19808wiv.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.138.MISMATCH!xlned.com!feeder5.xlned.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!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!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: Sat, 23 Mar 2013 09:32:47 +0100 Organization: cbb software GmbH Message-ID: <2uov3k9xh2ii.1feiwunvo08ai$.dlg@40tude.net> References: <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> <10cliooad0uk.1prxobehp9yr0.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-23T09:32:47+01:00 List-Id: On Fri, 22 Mar 2013 16:05:47 -0700 (PDT), Shark8 wrote: > On Friday, March 22, 2013 4:18:02 PM UTC-6, J-P. Rosen wrote: >> Le 22/03/2013 15:54, Dmitry A. Kazakov a �crit : >> >>>> > Therefore, >>>> > you can't translate Ada's subtypes into the terms of ADT. >>> I just did it. >> >> And that's where everybody (including those who designed/maintain the >> language) thinks you are wrong. > > I think I can see Dmitry's point but, like you said earlier, it's a matter > of definitions Then there should an alternative definition of ADT... > So the problem is in the conflation of "values" and "valid values" of some [sub]type. The problem is that subset is a set. So valid values are simply values of Positive. If you don't change the definition of ADT, Positive will keep on being ADT. > That all is, IMO, a problem exacerbated in CS by the overpowering > prevalence of "extension" in the "Object Oriented" paradigm; this even to > the point that some of the new CS graduates [superficially] seem utterly > unable to grasp the usefulness/utility of excluding values. Right. The litmus test is to ask somebody who does not know Ada, isn't C's int a class (type). This would produce no less fume as Positive vs. ADT. It is a pity that Ada community keeps on insisting on this on their side of the wall, refusing to see that either subtype or tagged type, they are just different ways of creating a new type from existing ones, while having a type for objects accommodating values of both ancestor and predecessor types. There is no reason why derived types shall always be extensions. It is an *implementation* detail. Ada people should knew better about separation of interface and implementation. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de