[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: an alternative idea for general binary vectors

This page is part of the web mail archives of SRFI 66 from before July 7th, 2015. The new archives for SRFI 66 contain all messages, not just those from before July 7th, 2015.

>>>>> "Taylor" == Taylor Campbell <campbell@xxxxxxxxxxxxxxxxxx> writes:

Taylor> Sorry, I meant to add a note about endianness, but I completely forgot
Taylor> to while writing that mail.  I don't think that it a very big issue: it
Taylor> could work in a manner similar to SRFI 56 (binary I/O), where there is
Taylor> one 'default endianness' (local to the machine), and all of the endian-
Taylor> affected procedures accept an optional endianness parameter.  For
Taylor> instance, the signature for BINARY-VECTOR-SET-S16! would be:

Taylor>   (BINARY-VECTOR-SET-S16! binvector index signed-halfword [endianness])

Taylor> This wouldn't be too much of a compromise on efficiency, and the API is
Taylor> made hardly more complicated with the extra endianness parameter.

Do you mean that the endianness parameter defaults to the
machine-native endianness?  That'd be a sure-fire recipe for
portability hell.  Cf. how many times people forget htonl(3).

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla