[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bytevector-copy creates srfi-4 vector with greater length
From: |
Taylan Ulrich Bayırlı/Kammer |
Subject: |
Re: bytevector-copy creates srfi-4 vector with greater length |
Date: |
Mon, 27 Oct 2014 12:00:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Mark H Weaver <address@hidden> writes:
> Thoughts?
I have no experience with SRFI-4 so don't know what would be most
pragmatic, but reading the specification, I see s8vector, u8vector,
s16vector, etc. are all distinct data types, though u8vector corresponds
to u8vector from SRFI-66, bytevectors from R6RS, and bytevectors from
R7RS. Thus I would expect those four to be the same data type, and
distinct from the other SRFI-4 types. Correspondingly, I'd expect the
SRFI-4/66 u8vector and R6/7RS bytevector APIs all to work on that type
and only that type. Other types from SRFI-4 should have their dedicated
APIs, including a copy procedure.
That seems like the relatively obvious Right Way to me, unless I'm
missing something.
If useful, there could be a separate API of procedures that work on both
u8vector (i.e. bytevector) and other SRFI-4 data types, but otherwise
I'm of the opinion that any distinct data type exposed to Scheme users
should also have its dedicated API that works on no other types.
Taylan