Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!usc!snorkelwacker!bu.edu!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.misc Subject: Re: Some things that pointer-less languages can't do efficiently Message-ID: <2650@l.cc.purdue.edu> Date: 17 Oct 90 17:58:43 GMT References: <10397:Oct1212:55:1090@kramden.acf.nyu.edu> <65642@lanl.gov> <641@skye.cs.ed.ac.uk> Organization: Purdue University Statistics Department Lines: 23 In article <641@skye.cs.ed.ac.uk>, db@cs.ed.ac.uk (Dave Berry) writes: > In article <3976@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: > >(Don't run away with the idea that I'm defending pointers. My favourite > >languages include ML, Scheme, and Prolog. > > ML has reference values, which are basically pointers. There just > isn't much need to use them. Here is an actual situation, which I see no good way to handle without pointers. One is reading from a buffer, and the buffer can become inadequate at unpredictable times. When this happens, one calls a refill program. The information as to where the buffer is, where if ends, and possibly other necessary information for the refill procedure, as well as where the refill procedure, are changeable at run time. One could use call by value, which requires lookup. But using call by reference for both the refill procedure and the struct which contains the buffer information, usually in the form of locations and sizes, are by far the natural and logical way to do it, as well as being efficient. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet) {purdue,pur-ee}!l.cc!cik(UUCP)