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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,9d58048b8113c00f X-Google-Attributes: gidf891f,public X-Google-Thread: 1014db,9d58048b8113c00f X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,2e71cf22768a124d X-Google-Attributes: gid103376,public X-Google-Thread: 101deb,b20bb06b63f6e65 X-Google-Attributes: gid101deb,public X-Google-Thread: 10cc59,9d58048b8113c00f X-Google-Attributes: gid10cc59,public From: rav@goanna.cs.rmit.EDU.AU (++ robin) Subject: Re: next "big" language?? (disagree) Date: 1996/06/12 Message-ID: <4plaa6$c7a@goanna.cs.rmit.EDU.AU>#1/1 X-Deja-AN: 159711491 references: <4p1l65$35qi@info4.rus.uni-stuttgart.de> <4p60nk$imd@euas20.eua.ericsson.se> <4p8lmq$oq7@goanna.cs.rmit.edu.au> <4pj8p7$h9r@goanna.cs.rmit.EDU.AU> organization: Comp Sci, RMIT, Melbourne, Australia newsgroups: comp.lang.pascal,comp.lang.c,comp.lang.misc,comp.lang.pl1,comp.lang.ada nntp-posting-user: rav Date: 1996-06-12T00:00:00+00:00 List-Id: ag129@ucs.cam.ac.uk (A. Grant) writes: >In article <4pj8p7$h9r@goanna.cs.rmit.EDU.AU> rav@goanna.cs.rmit.EDU.AU (++ robin) writes: >> >euahjn@eua.ericsson.se (Henrik Johansson) writes: >> >>assertion expression found in other languages like Eiffel ( >preconditions,> >>postconditions, assertions). >>---What is the point of this? >> A declaration buried somewhere else, and a test. >> Why not something in clear english, which doesn't need a >>reference to some other part of the program, like: >> if mod(x, 2) ^= 0 then >> put ('The value of x is not odd.'); >The point of assertions is not to print messages for the >programmer. ---If you don't tell the programmer that something is wrong, there's really little point in putting extraneous clutter in the program. > You can use them to allow the compiler to >optimise safely, provide a contractual interface between >modules, and for preconditions, postconditions, loop invariants >etc. when proving the correctness of programs. >E.g. the assertion that X is odd could form part of the >declared interface to a module whose implementation was hidden. ---That may be so, but if the program doesn't feed the fact that there is a violation, then there's no point in the program.