Nested Quasis

Mark S. Miller erights at google.com
Sat Jan 28 20:40:08 PST 2012


On Sat, Jan 28, 2012 at 5:54 PM, Erik Arvidsson <erik.arvidsson at gmail.com>wrote:

> Under the open issues for Quasi Literals,
> http://wiki.ecmascript.org/doku.php?id=harmony:quasis#nesting , the
> topic of nesting is brought up.
>
> After implementing Quasi Literals in Traceur it is clear that
> supporting nested quasi literals is easier than not supporting them.
>

+1000. Quasis as originally proposed had no such restriction. The Unicorns
example at <http://wiki.ecmascript.org/doku.php?id=harmony:quasis#nesting>
is I think fairly representative of what will become a common kind of use
case -- unless we cripple quasis. I would be interested in seeing what this
code looks like when refactored to live within this restriction.

In E we have quasis that are somewhat similar and somewhat different. But
we make much use of the ability to place arbitrary expressions within the
dollar-hole, including nested quasis. I think our quasis as well should
allow any expression. The issue is not just nested quasis.



> What is the argument for not supporting nesting? Can we resolve this?
>
> --
> erik
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120128/0be0f283/attachment.html>


More information about the es-discuss mailing list