Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!sics.se!fuug!news.funet.fi!tukki.jyu.fi!sakkinen From: sakkinen@jyu.fi (Markku Sakkinen) Newsgroups: comp.lang.eiffel Subject: Re: Reference Semantics Message-ID: <1991Jun12.072557.7282@jyu.fi> Date: 12 Jun 91 07:25:57 GMT References: <131691@tut.cis.ohio-state.edu> <1181@tetrauk.UUCP> <133154@tut.cis.ohio-state.edu> Organization: University of Jyvaskyla, Finland Lines: 42 In article <133154@tut.cis.ohio-state.edu> ogden@seal.cis.ohio-state.edu (William F Ogden) writes: >In article <1181@tetrauk.UUCP> rick@tetrauk.UUCP (Rick Jones) writes: > ... >>Pointers in C do cause problems, and we have the experience of that, > >(Yes, and the safety problems with nitroglycerin made dynamite a welcome >discovery too. :-) > >> but it is >>very easy to make a lot of mistakes in C with pointers because the language >>doesn't help you handle them properly. References in an OOPL are a whole >>different issue. > >Somehow I'm getting this deja vu sensation that we're back in the late 60's >discussing Go To's. One side is saying that Go To's (object references) have >an excessively complex semantics which can easily lead to programming errors. >On the other side, a few people concede that computed Go To's (C pointers) >might be a problem. However, most argue that since the jump instruction >(pointer) is essential for low level programming (basic data structuring), >it must be retained, perhaps slightly syntactically sugared, as a central >feature of high level programming structuring (reusable object design). Analogies and parables are often useful, but often also dangerous: keep in mind that they can only suggest something, never prove it. I think that the need to share some objects is much more fundamental for object modelling than is the need to jump for imperative programming. The (visible) use of references should be restricted to a minimum, but accepted without remorse whenever it is necessary. ---------------------------------------------------------------------- "All similarities with real persons and events are purely accidental." official disclaimer of news agency New China Markku Sakkinen (sakkinen@jytko.jyu.fi) SAKKINEN@FINJYU.bitnet (alternative network address) Department of Computer Science and Information Systems University of Jyvaskyla (a's with umlauts) PL 35 SF-40351 Jyvaskyla (umlauts again) Finland ----------------------------------------------------------------------