keithamus / proposal-object-freeze-seal-syntax

A JavaScript TC39 proposal for Object.freeze & Object.seal syntax
https://www.keithcirkel.co.uk/object-freeze-seal-syntax
59 stars 8 forks source link

Pattern matching connection #2

Open littledan opened 6 years ago

littledan commented 6 years ago

This proposal seems great in conjunction with @bterlson's pattern matching proposal. In particular, using sealed object (and maybe array) literals is a good way to assert that there is nothing else, while at the same time not giving multiple meanings to an object literal on the left-hand side.

keithamus commented 6 years ago

Great point! I'll look into adding examples about this!