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,39579ad87542da0e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.180.20.105 with SMTP id m9mr1644467wie.5.1368583276886; Tue, 14 May 2013 19:01:16 -0700 (PDT) Path: hg5ni110148wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.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!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Seeking for papers about tagged types vs access to subprograms Date: Wed, 8 May 2013 20:17:30 +0200 Organization: cbb software GmbH Message-ID: <4zjhjzc43b3k.1m0hacf27u3jt$.dlg@40tude.net> References: <17ceq51ydy3s0.s94miqqzbg5w.dlg@40tude.net> <1vrhb7oc4qbob$.q02vuouyovp5$.dlg@40tude.net> <19lrzzbgm77v6.1dzpgqckptaj6.dlg@40tude.net> <1bfhq7jo34xpi.p8n2vq6yjsea.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 15waz9CoS+eMakbyhTPyFQ.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-05-08T20:17:30+02:00 List-Id: On Wed, 08 May 2013 18:13:26 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Wed, 08 May 2013 17:29:33 +0200, Dmitry A. Kazakov > a �crit: >> Each time you do something with a type you get another one. > > Yes > >> Otherwise it >> becomes untyped. So if you wanted to disallow operations that would make >> another interface. > > That's what a subtype is to me (I don't know if it's the proper term; at > least it seems to match with Ada's own wording). No. Ada subtype cannot not disallow an operation. It can at best override one with "raise Message_Not_Understood;". In order to disallow an operation you need a new Ada type. Disallowing is not a constraint. >> To put it differently, there shall be no preconditions >> on types and their operations which aren't trivially true. > > I don't understand that point. Whatever differences are, they are rendered as differences in the interfaces rather that in the preconditions. Preconditions of arguments are always true, or else the language becomes weakly typed. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de