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=0.5 required=3.0 tests=BAYES_05,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 8 Jan 92 19:51:07 GMT From: agate!tully.CS.Berkeley.EDU!hilfingr@ames.arc.nasa.gov (Paul N. Hilfinge r) Subject: Re: Multiple Inheritance in Ada 9X/Pointers? Message-ID: List-Id: In article <1992Jan06.185123.188@microsoft.com> jimad@microsoft.com (Jim ADCOCK) writes: |> >Perhaps we should be discussing doing away |> >with pointers in C++ -- not MI !? to which, in article <1992Jan8.153857.26769@cis.ohio-state.edu>, weide@elephant.cis.ohio-state.edu (Bruce Weide) responds: |> Not a bad idea! ... what about a software discipline that says, "Don't |> USE pointers." I don't think that is the right topic. People often incorrectly formulate the old structured coding doctrine as "don't use goto's", whereas it was more properly seen as the POSTIIVE statement "use the most appropriate control structure (which happens almost never to be 'goto')". It is fair to say, I think, that use of the goto declined markedly, even though there are few languages in which it has been eliminated. Here, likewise, the more interesting topic is "what dynamic data types SHOULD we use for applications where we now use pointers?" A related comment and question: The statement "pointers are a (the most) dangerous feature in ..." is part of that portion of the folk wisdom that I most distrust---the plausible but untested (and often unexamined) broad claims that tend to get chorused by all us educators. Can anyone point me at good empirical studies of the frequency of errors in real code produced by experienced programmers that are caused by, e.g., using pointers instead of something more appropriate? Studies that show that, e.g., X% of errors are pointer- related or Y% of debugging time is spent tracing pointer-related errors are useful, but not completely satisfactory, since they lack controls (where would the errors be using alternative data structures). -- Paul N. Hilfinger, Associate Professor (510) 642-8401 Computer Science Division Hilfinger@CS.Berkeley.EDU Dept. of Electrical Engineering and Computer Sciences University of California Berkeley, CA 94720