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,6327f05d4989a68d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.79.228 with SMTP id m4mr3435000wix.7.1356187920225; Sat, 22 Dec 2012 06:52:00 -0800 (PST) Path: i11ni256694wiw.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!feeder.erje.net!us.feeder.erje.net!gandalf.srv.welterde.de!news.swapon.de!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Press Release - Ada 2012 Language Standard Approved by ISO Date: Wed, 19 Dec 2012 10:03:16 +0100 Organization: cbb software GmbH Message-ID: <1hviycwh3svxm$.1g4mgk471musw$.dlg@40tude.net> References: <50d17c6b$0$6576$9b4e6d93@newsspool3.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.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="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-12-19T10:03:16+01:00 List-Id: On Wed, 19 Dec 2012 09:35:56 +0100, Georg Bauhaus wrote: > On 19.12.12 00:24, Randy Brukardt wrote: >> "Robert A Duff" wrote in message >> news:wcc8v8vti17.fsf@shell01.TheWorld.com... > >>> Why does everybody neglect predicates, which are more important >>> than pre/post/invariant? >> >> No idea. Perhaps it is because only "old Ada hands" really grok the idea of >> a constrained subtype, and a predicate is just a constraint on steroids >> (well, a more general constraint). > > Being a function, maybe the power of a predicate is at first easier > to see by a "functional" programmer, who is used to predicates? Power? Types are not supposed to solve [functional] problems, algorithms are. The purpose of typing is bringing structure and safety (so abstraction, encapsulation, correctness checks etc, everything strictly non-functional). Do dynamic predicates this? I doubt that very much. > There is a need for a killer example, then. Maybe an algorithm that > approximates some complex result with the help of failing predicates. What sort of design should this promote? One that relies on catching exceptions from dynamic checks? Whom is that supposed to kill? The programmer? (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de