[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why vectors?

This page is part of the web mail archives of SRFI 99 from before July 7th, 2015. The new archives for SRFI 99 contain all messages, not just those from before July 7th, 2015.

On Mon, 2008-08-11 at 08:53 -0400, Physics wrote:
> On Sun, 10 Aug 2008, Derick Eddington wrote:
> > interoperating with the R6RS records procedures that deal in vectors
> > without having to convert list<->vector is not a good enough reason
> > compared to the benefit of using lists with one's primary record system
> > of use,
> What is the benefit of using lists?

The benefit of having the field specifiers of make-rtd, rtd-constructor,
rtd-field-names, and rtd-all-field-names be lists is: lists fit with all
the sequence-related things, both in standard Scheme and in others'
libraries, which use lists and not vectors.  E.g., memq for looking for
a field name, filter, append, reverse, etc.

Unless there's a compelling reason to use vectors, why not use Scheme's
natural sequence type: the list?

: Derick