On Wednesday, May 30, 2012 at 12:09 AM, Brendan Eich wrote:
> Brendan Eich wrote:
> > The only usable+secure extensions I see are two, so we don't confuse
> > users with almost-identical syntax with quite different (when it
> > matters most, when under attack) semantics:
> >
> > A. obj.{prop: val, ...} as safe mustache, with : for define not assign.
> >
> > B. obj.[prop = val; ...] with meta... of course, for fluent-style
> > chained assignments of obj's props.
> >
> > I use [ not { for the chained case so the bracketing as well as
> > ;-separation (final ; is optional) and = not : distinguish B from A
> > for readers looking at any punctuation.
> >
>
>
> Stop me if you've heard this one before...
>
> For B, instead of [] we could use () as the chained set/call brackets.
> E4X (ECMA-357) defines xml.(expr) as a filtering predicate expression,
> but no worries, E4X is going away.
>
> Comments welcome on the idea of avoiding using { for something that is
> neither a start-object-literal (in B) nor a block (contents are quite
> constrained).
>
>
Would property assignments be separated by comma or semicolon?
Eg.
o.( a = "alpha", b = "beta" )
v.
o.( a = "alpha"; b = "beta" )
Rick
>
> /be
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss