[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Combinators and Mutators
On Dec 28, 2003, at 3:49 PM, David Rush wrote:
Where is vector-fold/index??? All of the vector combinators should
have /index versions. My vector library (predating srfi-43) does this
because I frequently found myself in the position of needing it.
Having O(1) access is the whole point of using vectors, it seems silly
to prevent people from being able to cross-reference that access.
Oops. That's an oversight. I'll add it, and VECTOR-FOLD-RIGHT/INDEX,
I think that vector-insert!, vector-delete!,and vector-rotate! are bad
enough ideas to leave out. If you're going to be using these
operations enough to notice that you don't have them, you probably
shouldn't be using vectors to implement your collection in the first
place. Differring opinions on this subject *are* appreciated, but the
computational overhead to these operations is foolish to use unless it
constitutes part of the constant overhead of an algorithm (which is
pretty bloody unlikely).
OK. Sergei Egorov hasn't spoken up about them, so, if he doesn't
to a personal email to him that I shall write right now, I'll boot 'em
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/