Extensible destructuring proposal
samuel.hapak at vacuumapps.com
Tue Jul 21 06:14:19 UTC 2015
I have written proposal to allow extend standard behavior of object destructuring:
Main idea is, that currently object destructuring is useless for people who use Map or Immutable.Map (https://facebook.github.io/immutable-js/) as their main data structure.
This would allow authors of libraries to create map like structures that would support destructuring. It extends the language in a similar way iterator does.
The main idea is, that if object defines `Symbol.get` method, it gets used to access properties of object instead of `` when destructuring.
What do you think?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3589 bytes
Desc: not available
More information about the es-discuss