Brendan Eich wrote:
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.

By basically saying "what is inside .{...} does same things as what is inside {...} and Allen said a few posts before that spec is already written that way ({...} is (new Object).{...}).

So, established as legacy from (extended) object literals.

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()).

This does not answer the question, it's something else. I was asking on numberal (that is, probably, non-identifier from the subsequent parapgraph?) keys that can be included in (.){...} now.

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

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

Reply via email to