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

should there be conversion from/to homogeneous vectors? Duy Nguyen 24 Dec 2019 09:31 UTC

I see there are bitvector->vector/etc and vector->bitvector/etc but
there's no equivalent for homogenous vectors. Is it a good idea to add
them?

And if we add them, I think there's two different modes: "unpacked"
mode where each item in the bitvector becomes one item in, say
u8vector. 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.

Also it's not clear to me how the conversion from a vector to
bitvector happens. What if the vector contains values other than 0, 1,
#t and #f? Is that an error, or does vector->bitvector/etc consider
all non-zero as one/#t?
--
Duy