Re: [Scheme-reports] Bytevectors should be called u8vectors Marc Feeley 02 Jul 2012 13:22 UTC

On 2012-07-01, at 6:59 PM, John Cowan wrote:

> Marc Feeley scripsit:
>
>> Summary: Bytevectors should be called u8vectors
>
> Formal Comment ticket #435 filed.
>
>> I see no reason to introduce new names.  It will require many
>> implementations to implement the new names, and moreover the SRFI-4
>> names will have to be kept for code which uses SRFI-4.  This is
>> needless bloat.
>
> Though in general the WG voted on the first ballot to prefer SRFI choices
> over R6RS ones, a specific vote was taken on the third ballot which
> preferred 'bytevector' to 'blob'.  The terms 'u8vector', 'byte-vector',
> and 'octet-vector' were also on the ballot, but were nobody's first
> choice.
>
>> I also find the names bytevector-u8-ref and bytevector-u8-set!
>> very clumsy and verbose compared to u8vector-ref and u8vector-set!.
>
> http://trac.sacrideo.us/wg/wiki/BlobAPI , which was reviewed but not
> adopted by WG1 (it may become part of R7RS-large, however) proposes two
> sets of names, one of the form bytevector-<type>-ref which is indexed
> by byte index, and one of the fomr <type>vector-ref which is indexed
> by element number and is SRFI-4 compatible.  In the case of u8 and s8
> these of course coincide.  However, it would be very inconsistent to
> use u8vector-ref in the small language, where u8 is the only access type
> directly supported.
>
> I am therefore closing this ticket.

I think this topic needs more discussion.  The main point is that many (if not all) implementations of Scheme which support bytevectors are using the u8vector names, and you will be bloating these implementations by introducing new names which have no history.  Was this aspect brought up in the discussion before the vote was taken by WG1?

John, given that you have many Scheme implementations installed, can you test how many currently support u8vector-ref and how many support bytevector-u8-ref ?

Marc

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports