3 ms·
freeze is used quite often (for immutability). Proxies are there for security? It wasn't mentioned in the article and I don't see how it providers security, it
by exyi 4y ago
freeze is used quite often (for immutability).
Proxies are there for security? It wasn't mentioned in the article and I don't see how it providers security, it only makes things easier to use, right?
- j-pb 4y agoFreeze is completely inadequate for immutability, persistent data-structures are really what you want for immutability most of the time, and they give you the nice security properties for free. Most people think of proxies as JavaScripts "method-missing", but that's really not what they are for. They are an isolation primitive to build stuff like membranes [1][2][3]. [1]: https://tvcutsem.github.io/js-membranes https://tvcutsem.github.io/js-membranes [2]: https://tvcutsem.github.io/membranes https://tvcutsem.github.io/membranes [3]: https://www.youtube.com/watch?v=sClk6aB_CPk&ab_channel=JSConf https://www.youtube.com/watch?v=sClk6aB_CPk&ab_channel=JSCon...