Open lassik opened 11 months ago
I agree that unknown escapes should be errors, but I would rather not provide escapes other than \\
and \"
.
That's a good call, given that in Common Lisp "test\n"
is read as "testn"
and "test\t"
is read as "testt"
.
Specifically, CLHS section 2.4.5 says:
If a single escape character is seen, the single escape character is discarded, the next character is accumulated, and accumulation continues.
The standard "single escape character" is backslash, so CL has no special backslash escapes.
R5RS treats other escapes as having unspecified meaning.
I don't recall whether we made a deliberated decision about string escapes.
I think that either Pose should support the usual escapes like
\n
and\t
, or reading those escape sequences should raise an exception.It's treacherous if someone writes a newline as
\n
(using a non-Pose S-expression writer, such as the one built into every Lisp implementation) and it is read by a Pose reader as if it were the lettern
.