3 ms·
Here's that proposal. https://github.com/sebmarkbage/ecmascript-immutable-data-structures https://github.com/sebmarkbage/ecmascript-immutable-data-str...
by smasher164 11y ago
Here's that proposal. https://github.com/sebmarkbage/ecmascript-immutable-data-structures https://github.com/sebmarkbage/ecmascript-immutable-data-str...
- bcherny 11y agoha! i actually commented on this guy a few months ago. javascript is designed in such a way that i think true, clojure-like immutable data structures are not possible. we'd either need to overload comparators (===, ==) so that they compare immutable data by value (rather than by reference, which is the case for their mutable counterparts), or implement java-style .equals methods for immutable objects (or as static methods on their constructors). neither seems to be a great fit for javascript. see my comment here https://github.com/sebmarkbage/ecmascript-immutable-data-structures/issues/4#issuecomment-99555565 https://github.com/sebmarkbage/ecmascript-immutable-data-str...