should there be conversion from/to homogeneous vectors? Duy Nguyen (24 Dec 2019 09:31 UTC)
Re: should there be conversion from/to homogeneous vectors? Duy Nguyen (25 Dec 2019 09:20 UTC)

Re: should there be conversion from/to homogeneous vectors? Duy Nguyen 25 Dec 2019 09:19 UTC

On Wed, Dec 25, 2019 at 12:56 AM John Cowan <xxxxxx@ccil.org> wrote:
>> While in packed modes, 8 items in the bitvector becomes one
>> in u8vector. The packed mode could be useful for manipulating
>> compression/video bitstreams. But maybe bitvector is not the right
>> place for this.
>
>
> I think this does make sense, and I will add packng and unpacking conversions between bitvectors and bytevectors.  Note that SRFI 160 recommends that bytevectors and u8vectors be the same thing; however, in Guile they are disjoint.

Thinking a bit more about it, this may open a can of worms. If you
allow conversion between a bitvector and a u8vector, then what about
u8vector and u32vector (four u8 packed in one u32)? SRFI 160 does not
support conversion between homogeneous vectors of different types
either, so maybe we just leave it out and figure that out in a new
srfi (if it ever comes). I won't stop you from adding new conversions
in this srfi, of course :)
--
Duy