Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ucbvax!bloom-beacon!eru!hagbard!sunic!news.funet.fi!hydra!hylka!jpiitulainen From: jpiitulainen@cc.helsinki.fi Newsgroups: comp.lang.misc Subject: Re: Re^2: Some things that pointer-less languages can't do efficiently Message-ID: <3702.27287cf3@cc.helsinki.fi> Date: 26 Oct 90 18:14:11 GMT References: <26739:Oct1023:44:2690@kramden.acf.nyu.edu> <65450@lanl.gov> <10397:Oct1212:55:1090@kramden.acf.nyu.edu> <3975@goanna.cs.rmit.oz.au> <415@data.UUCP> <+CI6:YD@xds13.ferranti.com> <3407.2720318d@cc.helsinki.fi> Organization: University of Helsinki Lines: 43 In article , peter@ficc.ferranti.com (Peter da Silva) writes: > In article <3407.2720318d@cc.helsinki.fi> jpiitulainen@cc.helsinki.fi writes: > >> It is a pair of values. Pointers to values, as separate from values, do >> not exist. > > So, (a) is the same as a? One is a list containing the other. > No, addresses are not what I mean by pointers. The definition of a pointer > that I am using is "a token that can refer to any language object". The > operative word is "any". Is a pair a "token that refers" or does it contain two of those? If you define "pointer" so that pairs, vectors, variables and procedures and everything built of them become "pointers", then of course Scheme has pointers, but what's the point? Also, in that case the word is no longer useful to describe C pointers. >> are not needed and there is no such thing as a pointer to an integer. > > Really? As far as aliasing and debugging are concerned (3) is a pointer > to 3. (well, to 3 and nil) There are three things: a pair (3 . ()), an integer 3 and the empty list. The first contains the other two. Whenever P is a pair, there are three things: P itself, the thing that is its head and the thing that is its tail. Any two of them can be the same, or have the other as a component. In that case, they are said to "share structure", or to "be aliased" if you prefer. All the problems of aliasing and debugging that you can have in Scheme can be stated in terms of "identity of things" and "mutation of shared structure", without any "token that refers" that is not one of the language level things involved. There is no such thing as a pointer in Scheme, and no conceptual need for one. Pointers are objects in some languages. In Scheme they are not, and seeing them nevertheless just complicates things. > Peter da Silva. `-_-' Jussi Piitulainen jpiitulainen@cc.helsinki.fi