🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1810

Re: Re^4: Some things that pointer-less languages can't do efficiently

#1810
From: Peter da Silva
Date: Wed, 24 Oct 1990 16:47
35 lines
2097 bytes
First of all... what's a pointer? It's not a machine address. A pointer is
a token that refers to a value, such that it can refer to any value in
the domain of the language, and that more than one such token can refer
to a given value. The operation of getting to the value referred to is
called dereferencing.

In article <418@data.UUCP> kend@data.UUCP (Ken Dickey) writes:
> Gee, I thought there was this constructor CONS which takes two values.

And returns a pair of pointers. It can be implemented by writing down on
a piece of paper the safe-deposit-box-numbers of a safe-deposit-box in
New York City, but it is still functionally a pair of pointers.

> Will you please show me the pointer "abstraction" here?  How do I
> dereference the pointer to get a value?

	(car list)
	(cdr list)

> But it has been a long time since I did a (car '()).

And it's been a long time since I did a *NULL in C, so?

> It is true that there are pointers all through typical implementatons
> of Scheme, but there is no "pointer" in the definition of the language!

This is only a true statement if you think "machine address" when I say
"pointer". There are C implementations that have all the checking that
Lisp or Scheme does, and implement pointers as a pair of "array, offset".
These are *very* handy in debugging, but don't change the language definition
one iota.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter@ferranti.com
Technical Details
Message-ID: <83N6E05@xds13.ferranti.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter
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> <418@data.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter
From: peter@ficc.ferranti.com (Peter da Silva)
Newsgroups: comp.lang.misc
Subject: Re: Re^4: Some things that pointer-less languages can't do efficiently
Message-ID: <83N6E05@xds13.ferranti.com>
Date: 24 Oct 90 16:47:38 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> <418@data.UUCP>
Reply-To: peter@ficc.ferranti.com (Peter da Silva)
Organization: Xenix Support, FICC
Lines: 31