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: 103376,2e71cf22768a124d X-Google-Attributes: gid103376,public X-Google-Thread: 101deb,b20bb06b63f6e65 X-Google-Attributes: gid101deb,public X-Google-Thread: 1014db,9d58048b8113c00f X-Google-Attributes: gid1014db,public X-Google-Thread: 10cc59,9d58048b8113c00f X-Google-Attributes: gid10cc59,public From: djohnson@tartarus.ucsd.edu (Darin Johnson) Subject: Re: next "big" language?? (disagree) Date: 1996/06/25 Message-ID: #1/1 X-Deja-AN: 162142420 sender: djohnson@tartarus.ucsd.edu references: organization: UCSD Computer Science and Engineering Department newsgroups: comp.lang.pascal,comp.lang.c,comp.lang.misc,comp.lang.pl1,comp.lang.ada Date: 1996-06-25T00:00:00+00:00 List-Id: > >Obviously if there are two concepts, then we should have two names. For > >example (in Ada) we could stick with > > > > pragma Assert(x); > > > >for the traditional "please check this really is the case" assertion > >and introduce > > > > pragma Fact(x); > > > >(or some other name) for the "this really is true, trust me, and make > >appropriate optimisations" type assertion. Can anyone think of a better > >name (pragma Declare(x) is not available in Ada) than "Fact"? How about "Assert"!!! That's exactly what this means in English, despite the fact that Ada changed its meaning. "Assert" and "assertion" in English in no way mean "check that this is true". Instead, "pragma Assert(x)", or "#pragma assert(x)" should mean that x is assumed to be true; which implementation-wise may involve compiler optimizations that break things if the assertion is false (what exactly happens might be changed via compiler options, such the debugging does different stuff than production code). At least in C, an implementation can define "#pragma assert" to do something much different than the assert macro; even though it is confusing. -- Darin Johnson djohnson@ucsd.edu O- - Luxury! In MY day, we had to make do with 5 bytes of swap...