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

Re: Names and primitives in SRFI 56

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

On Fri, 17 Sep 2004, Hans Oesterholt-Dijkema wrote:

>Dear SRFI-56 members,

>3. I think it must be possible to interchange port and endian, i.e.
>   (read-binary-uint32 port endian) should be just as possible as
>   (read-binary-uint32 endian) (or even (read-binary-uint32 endian port)?)

Don't go there; that way lies madness.

>4. Why aren't there any primitives to do binary string writing and
>   reading, or even binary buffer reading and writing? Suppose I want
>   to read in a Bitmap? Suppose I want to read in strings without inter-
>   pretation?

Because there's no agreement yet as to what it means.  Encoding
issues and endianness can screw any attempt to read or write a
"string" in a form comprehensible to  something else that's not
the same scheme implementation.

Using binary primitives to write strings in binary formats
probably deserves to be a SRFI on its own, and that SRFI would
be best served by defining just two very simple encodings and
two very simple locales, to make sure that the ideas of encodings
and locales are meaningful.

Leave additional locales and encodings to additional SRFI's.

>   I think following constructs would be great:
>   (read-binary-string size port encoding)

I think so too, but it's miles and miles ahead of where we are.
You can just barely see it from here.