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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: G. B. Newsgroups: comp.lang.ada Subject: Re: "functional" programming in Ada Date: Thu, 8 Mar 2018 22:49:20 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <896b83c6-83d4-4ffc-8c56-1481802ea8fd@googlegroups.com> <961c82e0-7d7e-48af-8751-916a3332ccc5@googlegroups.com> <1520428274.2488.155.camel@obry.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 8 Mar 2018 22:49:20 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="218e7cb22af581791549c275c9386c54"; logging-data="10592"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nNKNO/bea1nSp3LlX5yQnZnyXI1AsRWg=" User-Agent: NewsTap/5.3.1 (iPhone/iPod Touch) Cancel-Lock: sha1:b2gdqa0x6UR1MauIaSVJoB/H1H4= sha1:fs9FAFBCdjJjRgcckRihRlQEvek= Xref: reader02.eternal-september.org comp.lang.ada:50899 Date: 2018-03-08T22:49:20+00:00 List-Id: Dmitry A. Kazakov wrote: > On 08/03/2018 04:34, Randy Brukardt wrote: >> The various contracts (preconditions, postconditions, predicates, etc.) all >> contain some executable code, and it is necessary for callers to be able to >> understand those contracts. Expression functions help in this, while the >> bulk of the implementation should remain in the body. > > These are not contracts if have any executable code, and more > importantly, understanding cannot be achieved by exposing > implementation/code. > > P.S. Contracts exist prior the program (programs, actuall) and surely > prior to any execution of (any implementation of any programs under the > contract). > If there is nothing that ever assigns a value to a contract’s clause, then there id none. So, in order make it something, an evaluation of clauses needs to be performed. Somewhere, somehow. My brain is operating when doing this, or so I hope, and whenever it does following discipline, then it is executing a program. The troublesome idea is to think that the program and its contract are like “x ε x”, or like recursive types.