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: 103376,8acd4291c317f897 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,8acd4291c317f897 X-Google-Attributes: gid109fba,public From: "Matthew Heaney" Subject: Re: Safety of the Booch Ada 95 Components Date: 1999/12/12 Message-ID: <3853f007_1@news1.prserv.net>#1/1 X-Deja-AN: 559779602 Content-transfer-encoding: 7bit References: <1e2lds4.7trgj21rgj9i0N%herwin@gmu.edu> Content-Type: text/plain; charset="US-ASCII" X-Complaints-To: abuse@prserv.net X-Trace: 12 Dec 1999 18:57:11 GMT, 129.37.213.126 Organization: Global Network Services - Remote Access Mail & News Services Mime-version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c++ Date: 1999-12-12T00:00:00+00:00 List-Id: In article , Simon Wright wrote: > The BCs equivalent for assignment is (no warranties, remember) > > BB == BB' and (BA == BB' > or an exception is raised) That's exactly it. Yes, this lacks "rollback semantics," but I'm perfectly happy with this postcondition, as it's likely to be far more efficient than its stronger alternative: HB == HB' and (HA == HB' or an exception is raised and HA == HA') I'd be willing to bet that most systems programmers would NOT be satisfied with this postcondition, if they knew how inefficient it is compared to the other. Perhaps there is a middle position. We could guarantee that if assignment fails, then the target data structure is cleared, instead of being left in some unknown state: HB == HB' and (HA == HB' or an exception is raised and HA.Length == 0) -- The political forces that try to eliminate evolution from science classrooms impose a narrow, sectarian doctrine on our educational systems. This imposition represents an affront not only to the constitutional separation of church and state but also to the moral and intellectual integrity embedded in that constitution.