kris.kowal at cixar.com
Thu Dec 17 20:00:55 PST 2009
I am also in favor of the quasi-literal type name not being mangled.
I would, in fact, consider making the quasi-literal type any
expression returning a function, even if this necessitates a
You might consider refining the escaping rules to resemble r"raw
strings" as in Python. That would afford a greater degree of
flexibility in escaping rules within the quasi-literal. The only
difference is that in a raw string, only backslash before the same
quote character as the enclosing quotes and a backslash are treated as
escape characters and all others are preserved. Then, the
quasi-literal function would be entirely in control of the meaning of
other escaped characters.
There's also a trade-off between using back-ticks and plain
double-quotes. Using back-ticks affords us an opportunity to have a
"default" quasi-literal. On the other hand, I don't miss having to
distinguish front and back ticks in Perl. Also, it might be
undesirable to have to claim a variable name for the default case,
unless your intention is that the default quasi-literal have a
consistent behavior in any scope.
In one of my former language projects, I considered something similar
for numbers, in suffix. For example: 3ce for "thrice" or 1mm for "one
millimeter", where "ce" and "mm" were constructors in scope.
More information about the es-discuss