[scheme-reports-wg1] Re: Blobs vs. byte vectors
John Cowan 23 May 2011 06:37 UTC
Andy Wingo scripsit:
> It is a leaky abstraction, I think. For any unit which is not one
> byte in length, you always have to be concerned about the size of the
> total array. There's no way to treat (make-blob 5) as an array of u32
> values.
Well, technically you could see it as two overlapping u32s, one in
bytes 0-3 and the other in bytes 1-4, or whatever. The reason I
didn't propose SRFI-4-compatible stuff in the BlobAPI is to allow
misalignments. Although I did list the possibility of requiring
alignment under Issues.
> How would a blob not be interpretable an array of bytes?
Well, it always would be, yes: bytes are the least common denominator.
But so would bits be.
--
Deshil Holles eamus. Deshil Holles eamus. Deshil Holles eamus.
Send us, bright one, light one, Horhorn, quickening, and wombfruit. (3x)
Hoopsa, boyaboy, hoopsa! Hoopsa, boyaboy, hoopsa! Hoopsa, boyaboy, hoopsa!
--Joyce, Ulysses, "Oxen of the Sun" cowan@ccil.org