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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!seas.gwu.edu!mfeldman From: mfeldman@seas.gwu.edu (Michael Feldman) Newsgroups: comp.lang.ada Subject: Re: Pre-condition vs. Post-condition Message-ID: <2937@sparko.gwu.edu> Date: 26 Mar 91 23:36:40 GMT References: <20600091@inmet> <23141@as0c.sei.cmu.edu> <2918@sparko.gwu.edu> <2929@sparko.gwu.edu> <5074@goanna.cs.rmit.oz.au> Reply-To: mfeldman@seas.gwu.edu () Organization: The George Washington University, Washington D.C. List-Id: O'Keefe's posting gave such a good discussion of the issues that there's not much to add, except the following: The whole thread started with preconditions. I think Ada has a chance to make life a whole lot easier by making it _possible_ to initialize all types with default initial values, consistently. I am not interested in having clients depend upon the initial values; rather I want clients to be able to depend on variables, types, whatever, _not_ being _uninitialized._ There will always be something in there that's "in-range" for the type. Clearly Ada83 thought this was worth doing for access types, and look how much easier it is to write linked-list packages because there are no garbage pointers to worry about (leave aside the dangling-pointer problem left unsolved by Unchecked_Deallocation!) I was told once by an Ada83 high priest that the reason record fields can be initialized is that, syntactically, it's "free" because the syntax of a field declaration is the same as the syntax of a variable declaration. I got the impression that the thinking didn't go much deeper than that. They didn't bother with initializers for other types because it wasn't free. Mike