[r6rs-discuss] [Formal] "Byte-vector" would be a better name than "bytes" for a data type.

From: Shiro Kawai <shiro>
Date: Tue Nov 14 14:57:29 2006

From: Eli Barzilay <eli_at_barzilay.org>
Subject: Re: Re: [r6rs-discuss] [Formal] "Byte-vector" would be a better name than "bytes" for a data type.
Date: Tue, 14 Nov 2006 14:46:27 -0500

> sub1, still.
>
> IMO:
>
> * `bytes' are closer in use to strings than vector.
>
> * so `byte-string' is a better name, but then `character-' is implicit
> in one but not the other. Similar asymmetry to `length' vs
> `vector-length'.
>
> * so a better choice would be `character-string' and `byte-string',
> but that's inconvenient.
>
> * so `bytes' is a good compromise. (I use "byte strings" in text
> instead of "byteses".)

A bit off-topic...

Hmm.. byte-vector strongly suggests it's an array of bytes,
implying indexed access is O(1). I think it matches the
practical use of byte vectors (such as dealing with contiguous
region of memory).

On the other hand, a string is a sequence of characters, but
it doesn't need to be an array of characters---it may
internally be a list of characters, or a balanced tree, or
something else.

So byte<->vector and character<->string aren't parallel, IMHO.

To return to on-topic, I'm +1 to byte-vector.

--shiro
Received on Tue Nov 14 2006 - 14:57:32 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC