From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 10 Jan 92 01:39:27 GMT From: mole-end!mat@uunet.uu.net Subject: Re: Multiple Inheritance in Ada 9X/Pointers? Message-ID: <1992Jan10.013927.10479@mole-end> List-Id: In article <1992Jan8.225611.3226@cis.ohio-state.edu>, weide@elephant.cis.ohio-s tate.edu (Bruce Weide) writes: > In article > hilfingr@tully.CS.Berkeley.EDU (Paul N. Hilfinger) writes: . . . > >Here, likewise, the more interesting topic is "what dynamic data types > >SHOULD we use for applications where we now use pointers?" > Yes, this is (part of) the question I was proposing ... Let me try again: > "What abstractions should we use to replace pointers?" > Another part of the question is something like, "What useful abstractions > require direct use of pointers for their (efficient) implementation?" Another useful question is ``How can we mitigate the whatever danger arises from pointers?'' . . . > ... I'd argue ... if pointers must be used in the representation of some > abstraction, then at least this fact should not be discernible to the > client of that abstraction. ... then the uses of pointers may be buried > deep in the ... software system, where ... they can be kept under control. > The pointers need not percolate all the way up to higher-level > abstractions. ... Here's a question: how many uses of pointers (or unchecked array bounds, which are nearly as dangerous) can be stereotyped? How many of those can be written as templates, to be coded once, gotten right, and never coded again? Yes, that's what they said about subroutines, but they didn't realize that the world is made of more than integers. Other measures are possible: `pointer' types that MUST be initialized, indexing types whose values can only be created by functions under control of whoever `owns' the data structure, &c. It will probably be easier to do these things for the elements of code that derive from --programming-- technology, not those that derive from features of the problem or the subject matter. (But --code-- that derives from subject matter libraries is a mixture of problem-specific and code-specific features.) I can't speak for features that derive from the environment or resources surrounding the program. Of course, whomsoever codes the AVL or 2-3 or Lempel-Ziv templates had better get them right--and whomsoever codes them as anything but templates is a selfish, shortsighted wastrel, not unlike those who burn rainforest to get 1-year cropland. (My opinion, I know, so flame gently please.) -- (This man's opinions are his own.) From mole-end Mark Terribile uunet!mole-end, Somewhere in Matawan, NJ