Article View: comp.lang.misc
Article #2543Re: Some things that pointer-less languages can't do efficiently
From: Jeff Dalton
Date: Fri, 21 Dec 1990 18:14
Date: Fri, 21 Dec 1990 18:14
27 lines
1786 bytes
1786 bytes
In article <5P57P18@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes: >In article <3808@skye.ed.ac.uk> jeff@aiai.UUCP (Jeff Dalton) writes: >> What you can't do is: > >> (setq a '(some list)) >> (setq b (pointer-to (cdr a))) > >But "a" is already a "pointer" to "cdr a". In this case the "reference" >operation is simply "cdr". And in that sense of "pointer to" it's also a pointer to (cadr a) and to (car (symbol-value (intern (elt (string (car a)) 0)))) [ie, the car of s]; it's just that the dereference operation is cadr or (lambda (x) (car (symbol-value (elt (string (car x)) 0)))). >You want to factor the pointer out of the cons. I don't care if you can >or not: the cons already has the same semantics as a pair of pointers, and >everything that can be said "about" pointers can be said "about" a cons. Then why do some Lisps add locatives? They can do things that can't be done with cons and cdr, that's why. Common Lisp simulations of locatives were posted in comp.lang.lisp not too long ago, if anyone wants to see what it involves. -- JD
Technical Details
Message-ID:
<3885@skye.ed.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!jeffReferences:
<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> <3716@skye.ed.ac.uk> <HEZ6WP9@xds13.ferranti.com> <3808@skye.ed.ac.uk> <5P57P18@xds13.ferranti.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!jeff From: jeff@aiai.ed.ac.uk (Jeff Dalton) Newsgroups: comp.lang.misc Subject: Re: Some things that pointer-less languages can't do efficiently Message-ID: <3885@skye.ed.ac.uk> Date: 21 Dec 90 18:14:21 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> <3716@skye.ed.ac.uk> <HEZ6WP9@xds13.ferranti.com> <3808@skye.ed.ac.uk> <5P57P18@xds13.ferranti.com> Reply-To: jeff@aiai.UUCP (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 27