Re: New draft (#4) of SRFI 207: String-notated bytevectors
Daphne Preston-Kendal 07 Oct 2020 09:07 UTC
On 6 Oct 2020, at 19:16, Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
> I'm still very much in favor of adding #utf8"..." to the lexical
> syntax as well (haven't got a definite reply on that). Not only is
> this useful for UTF-8 encoded bytevector literals of a post-ASCII
> world, it also makes it clear that u8"..." is *not* about UTF-8
> encoding and thus helps to clarify the role of \xnn; in u8"..."
> literals, which a number of people found otherwise non-obvious.
I think a reasonable implementation should be able to evaluate
(string->utf8 "...") at compile time to provide this as a friendly
notation. By contrast, there was previously no easily-human-readable
way to write bytestrings before. If I had known about John's bytestring
procedure idea before proposing the reader notation, I would probably
not have bothered with it — but even so, #u8"r\xE9;cursivit\xE9;" seems
easier to me than (bytestring "r" #xE9 "cursivit" #xE9).
#utf8"récursivité" seems, comparatively, like a small gain compared to
(string->utf8 "récursivité").
Daphne