SRFI 207: String-notated bytevectors Arthur A. Gleckler (15 Aug 2020 23:29 UTC)
Re: SRFI 207: String-notated bytevectors Per Bothner (16 Aug 2020 00:31 UTC)
Re: SRFI 207: String-notated bytevectors Alex Shinn (16 Aug 2020 01:16 UTC)
Re: SRFI 207: String-notated bytevectors Lassi Kortela (16 Aug 2020 10:15 UTC)
(missing)
Re: SRFI 207: String-notated bytevectors Lassi Kortela (16 Aug 2020 10:40 UTC)
Re: SRFI 207: String-notated bytevectors John Cowan (17 Aug 2020 03:18 UTC)
bytestring procedure Lassi Kortela (17 Aug 2020 07:56 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (17 Aug 2020 16:10 UTC)
Re: SRFI 207: String-notated bytevectors Shiro Kawai (18 Aug 2020 00:19 UTC)
Re: SRFI 207: String-notated bytevectors Lassi Kortela (18 Aug 2020 06:51 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 07:04 UTC)
Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal (18 Aug 2020 09:53 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 10:14 UTC)
Re: SRFI 207: String-notated bytevectors Shiro Kawai (18 Aug 2020 10:50 UTC)
Re: SRFI 207: String-notated bytevectors Lassi Kortela (18 Aug 2020 10:57 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 11:22 UTC)
Re: SRFI 207: String-notated bytevectors John Cowan (18 Aug 2020 15:49 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 16:12 UTC)
Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal (18 Aug 2020 16:38 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 17:00 UTC)
(missing)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 18:49 UTC)
Re: SRFI 207: String-notated bytevectors John Cowan (18 Aug 2020 22:30 UTC)
Re: SRFI 207: String-notated bytevectors Shiro Kawai (19 Aug 2020 20:38 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (19 Aug 2020 20:44 UTC)
Re: SRFI 207: String-notated bytevectors John Cowan (19 Aug 2020 21:55 UTC)
Re: SRFI 207: String-notated bytevectors Shiro Kawai (20 Aug 2020 00:54 UTC)
Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal (20 Aug 2020 06:04 UTC)
Re: SRFI 207: String-notated bytevectors Shiro Kawai (20 Aug 2020 06:09 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (20 Aug 2020 06:33 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 17:43 UTC)
Re: SRFI 207: String-notated bytevectors John Cowan (18 Aug 2020 17:49 UTC)
Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal (18 Aug 2020 18:31 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 16:16 UTC)
Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal (18 Aug 2020 09:48 UTC)
Re: SRFI 207: String-notated bytevectors Marc Nieper-Wißkirchen (18 Aug 2020 10:02 UTC)
Re: SRFI 207: String-notated bytevectors Lassi Kortela (18 Aug 2020 10:27 UTC)
Re: SRFI 207: String-notated bytevectors Lassi Kortela (18 Aug 2020 10:28 UTC)
Re: SRFI 207: String-notated bytevectors Daphne Preston-Kendal (16 Aug 2020 10:31 UTC)
Re: SRFI 207: String-notated bytevectors Lassi Kortela (16 Aug 2020 10:10 UTC)

Re: SRFI 207: String-notated bytevectors Lassi Kortela 18 Aug 2020 10:27 UTC

> Yes, and if we write #u8("bla" #x80 "blubb"), there is no confusion.

+1. Confusion avoided + re-using existing number syntax = win.

I agree that a #u8(...) which can mix single-byte and multi-byte parts
is not as nice and symmetrical as Scheme's (list ...) and (vector ...)
and (string ...) all of which take only single elements as arguments.
However, I also agree with Marc that it's useful and ambiguous. I don't
have a clear opinion on which consideration is more important.

> But there would be confusion if #u8("bla\x80;blubb") meant something
> different than (string->utf8 "bla\x80;blubb")

Would be solved by forbidding \x escapes inside bytestring literals.

> (note the C/C++ also uses the u8 prefix for UTF-8 encoded strings).

That's a nice precedent to have. However, Scheme uses u8 for bytevectors
in general, so the precedent is not as obvious in Scheme.

> And it would forbid Schemes to extend "..." to any string literal that
> is already allowed in that Scheme.

IMHO this restriction is actively desirable. String escapes are
complicated and confusing enough as they are, and any given escape would
be less useful inside a bytestring than a normal string.

> C distinguishes between \Xnn and \Unnnn (since C11) escape sequences.

\U is nice since it's mnemonic for Unicode. \X is confusing since it's
not obvious whether it's a raw byte or a codepoint, and if a codepoint,
which character set and encoding. This confusion is not really anyone's
fault since C (and Scheme) are old enough that they couldn't have
predicted that Unicode became a standard. However, now we have the
benefit of hindsight and should resist the temptation to invent new
escapes that are not mnemonic.