Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!eos!ptolemy!raymond From: raymond@ptolemy.arc.nasa.gov (Eric A. Raymond) Newsgroups: comp.lang.lisp Subject: Re: pointers in Lisp Message-ID: <984@ptolemy.arc.nasa.gov> Date: 3 Feb 89 21:50:26 GMT References: <1710@cps3xx.UUCP> <27884@ucbvax.BERKELEY.EDU> Reply-To: raymond@ptolemy.UUCP (Eric A. Raymond) Organization: NASA Ames Research Center, Moffett Field, CA Lines: 28 In article <27884@ucbvax.BERKELEY.EDU> edward@ucbarpa.Berkeley.EDU.UUCP (Edward Wang) writes: >In article <1710@cps3xx.UUCP> artzi@cpsvax.cps.msu.edu (Ytshak Artzi - CPS) writes: >< I need to implement (in Common Lisp) a structure with pointers. I will >< Please don't propose an array of pointers with a flag randomly >< chosen between 1 and 10. > >How about not having a size field at all but use array-dimension >when you need to know? What about those things called lists? By the way, the beauty of Lisp is that you don't have to pre-type your variables. For example in (defstruct thing component1 component2 ...) you can setq anything (i.e. atom, list, array, structure) to any of the components. Don't worry about pointers in Lisp. It's not really that important a concept as it is in C or Pascal. The language shields you from the hassle (and in only a few instances does this really get in the way). -- Eric A. Raymond (raymond@pluto.arc.nasa.gov) Nothing left to do but :-) :-) :-)