[patch] 6746458 support for exotic identifiers (identifier superquote)
Per Bothner
Per.Bothner at Sun.COM
Tue Sep 9 15:47:35 PDT 2008
John Rose wrote:
> The proposed use of # does not affect any other proposal on the table.
> The # has to be immediately followed by a double-quote character (and a
> valid string literal) in order to constitute a quoted identifier. Given
> the small number of ASCII characters, it is unreasonable to ask that
> potential language extensions have exclusive rights to any of them.
Yes, we don't want to grab any single ASCII characters - instead
we're grabbing a sequence of two ASCII characters: '#' '"'.
Using '"' as the second of those is convenient, because it makes
it obvious that string escapes are allowed - but we can allow
string escapes even if we use another delimiter.
As an old Lisper/Schemer, something like this
\|class|
looks more natural. You'd still allow string escape sequences -
to generate "|\n|" you could write:
\|\|\n\||
Ugly, but that's an extreme example, of course.
--
--Per Bothner
per.bothner at sun.com per at bothner.com http://per.bothner.com/
More information about the compiler-dev
mailing list