Quasi-literals for templating?

Mark S. Miller erights at google.com
Wed Jun 15 16:31:22 PDT 2011


On Wed, Jun 15, 2011 at 4:16 PM, Axel Rauschmayer <axel at rauschma.de> wrote:

> Quick feedback: I haven’t seen SVE (substitution value expression?) defined
> anywhere and can’t find a description of using ${{var}} as syntactic sugar
> for "{var:${var}}".
>

At <http://wiki.ecmascript.org/doku.php?id=harmony:destructuring#issues>:

The shorthand {x, y} for {x: x, y: y} allowed on the left-hand side of
assignment should be allowed on the right too ...

This shorthand has nothing to do with quasis per se. It's just a convenient
expression syntax. So if we allow more expression syntaxes to appear between
`...${ and }...` and if this "more" includes this specific syntax, then we
can compose then to give the requested information conveniently without
violating alpha-rename-ability.



>
>
> On Jun 15, 2011, at 20:42 , Mike Samuel wrote:
>
> > 2011/6/15 Brendan Eich <brendan at mozilla.com>:
> >> The point is that the callSiteId captures all the
> literal/constant/loop-invariant parts of the quasi, both raw and cooked
> ("expandedLP"). The remaining quasi handler parameters are the necessarily
> variable, evaluated-at-runtime substitution expression results.
> >>
> >> The proposal needs to say this a bit more explicitly, and up front.
> >
> > Added http://wiki.ecmascript.org/doku.php?id=harmony:quasis#callsiteid
> > and renamed rawLP and unescapedLP.
> >
>
> --
> Dr. Axel Rauschmayer
>
> axel at rauschma.de
> twitter.com/rauschma
>
> home: rauschma.de
> blog: 2ality.com
>
>
>
> _______________________________________________
> 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/20110615/515f3ade/attachment.html>


More information about the es-discuss mailing list