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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5cf5e9dc8a9b809e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.180.24.132 with SMTP id u4mr3029361wif.6.1363061124635; Mon, 11 Mar 2013 21:05:24 -0700 (PDT) Path: g1ni60755wig.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!216.40.29.245.MISMATCH!novia!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!backlog1.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: =?utf-8?B?TWVhbmluZyBvZiDigJxjb250cmFjdHVhbOKAnSBhY2NvcmRpbmcgdG8gQWQ=?= =?utf-8?B?YQ==?= Date: Thu, 07 Mar 2013 02:20:46 +0100 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: 2LxnHgvKpADqRhp9m0TZ+A.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.14 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 3203 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-03-07T02:20:46+01:00 List-Id: Le Wed, 06 Mar 2013 23:35:54 +0100, Robert A Duff = a =C3=A9crit: > "Yannick Duch=C3=AAne (Hibou57)" writes: > >> Because naming and wording matters, especially with Ada :-P , I have >> this question. >> >> http://www.ada-auth.org/standards/12rat/html/Rat12-2-5.html >> Says: >>> These are not really contractual in the sense thatpreconditions, >>> postconditions and invariants arecontractual but are more akin to >>> constraints. >> >> What's not contractual with subtype predicates? And so what does >> =E2=80=9Ccontractual=E2=80=9D means exactly for Ada's definition auth= ors? > > There's no Ada-specific meaning for "contractual". You are quoting > the Rationale, not the RM. ;-) Yes, I knew, I was just plain wrong referring to =E2=80=9CAda's definiti= on = authors=E2=80=9D ;-) > If you have a formal parameter of subtype T, then T's predicate > forms part of the contract between the procedure body and its > callers. So does T's constraint. So I'd say predicates and > constraints are "contractual" in that sense. That's how I understand it too. > I think what John means is that predicates (like constraints) > can be used in cases like "X :=3D Y + 1;" where there's no > clear boundary between abstractions, with a contract between > those abstractions. It's just checking that Y+1 obeys the > constraints and predicates of X. > John is right that predicates are like constraints. Yes, and constraints are contracts=E2=80=A6 or not? Or may be constraint= s are just = more general than contracts? > We've got a bit of a mess: 5 or 6 kinds of constraint, "not null", > predicates, and invariants, all of which are basically the same > thing, with differences in minor details. I'd prefer a language > design that unified all those things. Yes, unification of some other stuffs too would be nice :-P That's a job= = for Ada's successor in 3045. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity