Re:Object.observe withdrawn from TC39
by msvan on Monday November 02, 2015 @05:41PM
(#10495901)
Alternatively, why not embrace immutability and add native immutable data structures to JS? I believe there is a TC39 proposal for this, in fact. Even if O.o had become mainstream, I would've stayed away from it. The immutability trend is not due to the impracticality of dealing with object observation, but due to inherent issues with mutable state.
[ Parent
| on HN ]
Re:Object.observe withdrawn from TC39
by smasher164 on Monday November 02, 2015 @09:20PM
(#10496956)
Here's that proposal. https://github.com/sebmarkbage/ecmascript-immutable-data-str...
ha! 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-str...