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

Re: forcing delimiters after escapes in quoted strings

Matthew Flatt <mflatt@xxxxxxxxxxx> writes:

> We'd much prefer to not invent yet another syntax for strings. There is
> a high bar for doing something other than established conventions.
> My feeling is that the established C notation is not ideal, but it is
> reasonable and more widely understood than any other notation.

The draft alludes to an alternative:

> Another possibility would be to use a delimited Scheme number within a
> string, as in Gambit.

Concretely, this would mean using Scheme literals for the scalar
values like so:

... are all syntaxes equivalent to #\A.

In strings, they would need to be delimited by something, say ";":

"\#e65;BC" => "ABC"

(Gambit currently has the char literals, but not the strings, I

This would have the advantage of being in line with the regular
numerical literals, thus avoiding redundancy in the lexical syntax.
It is, of course, completely different from what C and Java have.

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla