emacs-devel
[Top][All Lists]
Advanced

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

Re: bool-vector implementation in the Emacs core


From: Kim F. Storm
Subject: Re: bool-vector implementation in the Emacs core
Date: 27 Jan 2004 02:32:57 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

> I am not sure this is useful in general and worth adding to the C code.

Well, we already have support for (dense) bool-vectors of fixed length
in the core, so his proposal to extend that to support sparse (unlimited) bool
vectors sounds sensible to me.

However I think that--contrary to the dense bool vectors--the
inversion lists can just as well be implemented in Lisp, so I agree
that it is not worth adding to the C code just to extend the aref/aset
API to cover sparse bool-vectors.

Actually, looking at the code of aref and aset, I think it may very well
make sense to keep them separate.

BTW, the code I posted a few days ago had a bug in make-bool-vector.
Here is a fixed version, renamed not to collide with the built-in
make-bool-vector:

(defun make-sparse-bool-vector ()
  "Create an empty bool vector."
  (cons -1 nil))

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]