Herby Vojčík wrote:
.{...} has established ways to do things, like .{"0":"foo", "1":"bar"} (and recently it even had .{[key]:value}).

Established how? Mustache syntax was proposed last July, it's not fully in Harmony -- hence Allen's new strawman.

Computed property names in object literals was deferred at the last meeting. Arv argued convincingly that object literals should have static property names only. (This does not affect the @-prefix proposal, which is a strawman of sorts, although not written up by itself.)

I cannot see how would you do this in .(...)? .([0]="foo"; [1]="bar")?
Or you introduce .["foo", "bar"]?

See later post suggesting obj.(foo = 1; bar = 2; baz()).

Non-Identifier property names would be a hard case, I think. You'd have to write things out the long way using obj['fo@o'), etc.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to