On Feb 1, 2008, at 11:01 AM, David Brown wrote:

I'm noticing that most eggs and even a lot of the builtin libraries use strings to manipulate binary data. There is also a lot better support for
string manipulation (SRFI-13).

Yeah, but see below.


However, R5RS doesn't require strings to be bytes.


In compiled code many of the R5RS string procedures are re-written to "core" implementations, due to the '(usual-integrations)' default. So, for example, even if the 'utf8' module is imported into the "top- level" 'string-length' would still return a byte-count.

This is not true for interpreted code, nor for SRFI-13 (assuming 'utf8-srfi-13' is imported at the "top-level".)

So, am I safe, in Chicken, to use strings for binary data?

Generally, yes. Also check out the blob type.

  I start using
u8vectors, and then discovered that a lot of libraries I wanted to use to
manipulate them wanted strings.

The other possibility would be for me to enhance the libraries I'm using to
also work with u8vectors.

Yeah, Chicken idiom is very lazy w/ strings as binary vectors. I too would prefer something explicit.


Thanks,
David


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Best Wishes,
Kon




_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to