On Sun, Jan 6, 2019 at 2:10 AM Per Bothner <xxxxxx@bothner.com> wrote:

I think it would be helpful to allow, but not require, that
the uniform vector types be vectors.

I believe that ship sailed twenty years ago.  SRFI 160 is meant
to be backward compatible with SRFI 4, which says:
"These datatypes support operations analogous to 
the Scheme vector type, but they are distinct datatypes."

Consider a procedure that works on array indexes, such as build-array in srfi 164.
On some systems (including Kawa) it would be desirable to use s32vector
for the indexes, and to use use s32vector-ref to access a specific index.
But that reduces portability.  It would be beneficial to be able to use vector-ref,
even if the argument is a s32vector. 

Cond-expand and macros were designed for that job.  I'm going to be implementing
a library in the future that can use either bytevectors, u8vectors, or u1vectors through
exactly those means.  Bytevectors and u8vectors, which hopefully will be the
same thing on most Schemes (Guile is an exception), use 8 times as much
space, but they are more efficient to read and write one element at a time
than u1vectors are, at least on normal architectures.

-- 
John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
                if if = then then then = else else else = if;

--
        --Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/