[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: overriding car/cdr
From: |
Paul Jarc |
Subject: |
Re: overriding car/cdr |
Date: |
Mon, 22 Mar 2004 12:24:00 -0500 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
Marius Vollmer <address@hidden> wrote:
> Lists in Scheme and Lisp are not merely sequences, they are able to
> form general trees with all kinds of intentional structure sharing.
> Vectors are not at all like this.
Hmm, good point.
> Some lists are uses as sequences and it would indeed make sense to
> formalize this by introducing an abstract 'sequence' type for this,
> I'd say.
Yes, that might be the best way.
Ideally, I think, programmers shouldn't have to worry about list
vs. vector representation of sequence objects any more than they have
to worry about memory management. We ought to be able to say "give me
an object that supports these operations, and favors these certain
operations for performance", and let the computer figure out what
representation is best.
paul