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

Bit vectors

I only just noticed that the Boolean operations on bit-vectors (BIT-AND and so
forth) are non-destructive operations; they return a new bit-vector containing
the result.

This makes bit-vectors completely redundant with integers, which also have
non-destructive mapped Boolean operations (LOGAND and so forth), except for
the way they print and possibly some benefit to be derived from using
generic sequence operations on them.

I had always assumed that the big feature of bit vectors was the efficiency
to be gained by using destructive operations, in applications such as
parallel intersection and union of sets, e.g. in compiler flow analysis.

I would like to propose that Common Lisp either provide destructive bit-vector
operations, which store into their first argument (possibly in addition to the
non-destructive ones), or else that bit vectors be removed from the language
as an unuseful redundancy.