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!attcan!uunet!husc6!bbn!gatech!hubcap!billwolf From: billwolf@hubcap.clemson.edu (William Thomas Wolfe,2847,) Newsgroups: comp.lang.ada Subject: Re: Overloading of ":=", ADT survivability Message-ID: <3986@hubcap.UUCP> Date: 28 Dec 88 05:46:56 GMT References: <4193@enea.se> Sender: news@hubcap.UUCP Reply-To: wtwolfe@hubcap.clemson.edu List-Id: >From article <4193@enea.se>, by sommar@enea.se (Erland Sommarskog): >>> Now, WHY, is A of mode "in out" in the Assign procedure? If we had >>> "out" only, nothing "erroneous" could occur. >> >> Because the ASSIGN procedure needs to be able to DESTROY the old >> value; DESTROY procedures must read objects during the process >> of destroying them. Please review the recent discussion rather >> than recreating it, unless there are new issues to be considered. > > Talk about rehash. We all know, except Bill of course, that the memory- > management problem is best handled with garbage collection. And in article <4195@enea.se>, Erland also writes: > I think Ada should require garbage collection > that could be disabled with a pragma for critical applications. But consider what happens when the programmer of a critical application must write his/her assignment procedures. Use of the "out" mode results in the production of garbage. Since the GC crutch is not available, the more survivable "in out" mode is then preferred. Now since we know that "out" mode is worthless under certain circumstances, and since ADT designers must design for the widest possible audience, "in out" is the mode of choice. Similarly, when performing deletions and such, ADT designers must again design for the widest possible audience. This directly implies an ADT which manages its own deallocations. Certain aspects of the language tend to interfere with the need of critical applications to exercise total control over memory management; among these are the inability to integrate DESTROY procedures into the automatic destruction of local environments. Sure, it requires more mental discipline to be space-conscious. But with experience, it becomes automatic. Forgive me if I've been a bit harsh at times, but once a person has become accustomed to managing space and time simultaneously, complaints regarding pointer errors sound very much like complaints that it's too difficult to have to walk and chew gum at the same time. I like to program my ADTs to be *survivable*, in the hardest possible sense. An ADT should be capable of surviving multitasking, invalid parameters, memory exhaustion, whatever. Only then will the part achieve widespread acceptance. Bill Wolfe wtwolfe@hubcap.clemson.edu