News for hackers. Stuff that matters.
Re:JavaScript Pattern Matching Proposal by edflsafoiewq on Thursday April 26, 2018 @10:58AM (#16932444)
> in it's current state the proposal rquires, when matching against an object, to specify all it's fileds, say you have an object with keys a, b, c then even if you match soley against the values of a , b you are required to specify c and by doing so notify it's existence

I think this is wrong. The proposal says that a pattern like `{x}` matches if the object supports `ToObject` and if its `x` property is not undefined. It doesn't say anything about requiring that the object have no other own-properties. This is consistent with how destructuring already works in JS (it ignores any extra properties).

There are no comments on this comment yet.