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

Re: forcing delimiters after escapes in quoted strings

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




On Tue, 12 Jul 2005, Matthew Flatt wrote:

>At Mon, 11 Jul 2005 19:18:19 -0700 (PDT), bear wrote:
>> I think that the inlined hexadecimal notation requires a terminator.
>
>We'd much prefer to not invent yet another syntax for strings. There is
>a high bar for doing something other than established conventions.

The problem comes about with strings just like one that folk have been
using as an example in this very discussion:

Consider "\x61bc" for a moment: Is that a 3-character string
consisting of u+61 u+62 u+63 (latin small letters a, b, c) or is that
a single character string consisting of u+61BC (a CJK ideograph)?
Because the hexadecimal digits are also legitimate unescaped string
characters, the point at which hex notation terminates is ambiguous,
unless there is an explicit terminator.

This is why I'm strongly suggesting using the colon as a terminator;
the one string would be written "\x61:bc" and the other as "\x61bc:"

				Bear