Re: [heycam/webidl] Specify open dictionaries. (#180)

Thanks for the post-summary feedback folks. Having [toyed a bit more with Babel](https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Cstage-0&experimental=false&loose=false&spec=false&code=var%20o%20%3D%20Object.create(%7B%20x%3A%20%22x%22%2C%20y%3A%20%22y%22%20%7D)%0AObject.defineProperties(o%2C%20%7B%0A%20%20a%3A%20%7Benumerable%3A%20true%2C%20value%3A%20'a'%7D%2C%0A%20%20b%3A%20%7Benumerable%3A%20true%2C%20value%3A%20'b'%7D%2C%0A%20%20c%3A%20%7Benumerable%3A%20false%2C%20value%3A%20'c'%7D%2C%0A%20%20d%3A%20%7Benumerable%3A%20false%2C%20value%3A%20'd'%7D%0A%7D)%3B%0A%0Alet%20%7Ba%2C%20c%2C%20x%2C%20...rest%7D%20%3D%20o%3B%0Aconsole.log(a)%3B%0Aconsole.log(c)%3B%0Aconsole.log(x)%3B%0Aconsole.log(rest.b)%3B%20%0Aconsole.log(rest.d)%3B%0Aconsole.log(rest.y)%3B%0A%0A%0A) overnight, and following @domenic's and @jussi-kalliokoski's comments above, I'm now convinced option #1 (so @jyasskin's original proposal) is the right choice.

Domenic's right, this is the expected behavior of records; they reach into the prototype chain when using `[[Get]]` and don't when `spread`. Choosing a different name for open and closed dictionaries doesn't help here. And it will only make things more confusing once we have half-open dictionaries.

That said, we might want to add a note at the intention of editors saying open dictionaries match the semantics of `spread`, and should only be used in places where the available options are truly open-ended.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/180#issuecomment-252851974

Received on Tuesday, 11 October 2016 08:56:31 UTC