Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal 16 Aug 2020 10:31 UTC

On 16 Aug 2020, at 12:15, Lassi Kortela <xxxxxx@lassi.io> wrote:

>>   I suggest allowing literal printable Latin-1 characters.
>> I suggest instead allowing any character to be encoded as utf-8.
>
> Because we're having this debate, I suggest sticking with the draft's policy of only allowing printable ASCII :)

My thoughts exactly. Allowing any non-ASCII character is liable to cause confusion at best and actively mislead at worst as to what bytes are actually in the bytevector, even if a standardized encoding were chosen.

>> Did you consider the variant of allowing strings embedded in u8vector literals?
>> #u8("zero-terminated" 0)
>
> Also a good alternative.
>
> If we can assume widespread compile-time evaluation of `bytevector-append` and `string->utf8` on constant values, it seems less important which particular syntax is chosen.

In addition, John Cowan is considering a `bytevector` procedure which will add exactly this functionality. I’m discussing with him whether to merge our two SRFIs (his is not submitted yet) or keep them separate.

Daphne