develooper Front page | perl.perl6.internals | Postings from January 2002

Re: scheme-pairs?

Thread Previous | Thread Next
From:
Uri Guttman
Date:
January 25, 2002 20:57
Subject:
Re: scheme-pairs?
Message ID:
200201260456.XAA00199@home.sysarch.com.
>>>>> "PC" == Piers Cawley <pdcawley@bofh.org.uk> writes:

  PC> Uri Guttman <uri@stemsystems.com> writes:
  >> 
  >> but lisp dotted pair actually only can hold scalars in each node
  >> too. each node could be a pointer to other stuff or a value. that is
  >> classic lisp data structures, all things are trees or lists made from
  >> pairs.

  PC> Unless I'm completely misunderstanding the lisp refs I've been reading
  PC> recently, a scheme pair is restricted to holding pointers. Either to
  PC> other pairs or to things. If you represent it as an array, then you
  PC> can have:

  PC>    [\"string", $next_pair is reference]

  PC> but you couldn't have:

  PC>    ["car", $cdr is referent]

  PC> But I could be *way* off the mark there.

that is sorta what i meant by scalars there. i should have been
clearer. a dotted pair is a pair of pointers but a perl 6 pair is a pair
of full scalars. but even so, a PMC would need 2 pointer slots for a
dotted pair. one could be the data slot (points to string buffer, etc.)
the other could be this new PMC pointer slot that can double as the cdr
of a dotted pair.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About