An update on Object.observe

Coroutines coroutines at gmail.com
Tue Nov 3 21:18:16 UTC 2015


On Tue, Nov 3, 2015 at 3:26 AM, Alexander Jones <alex at weej.com> wrote:
> In my opinion, the fundamental record type we build our JS on should be
> getting dumber, not smarter. It feels inappropriate to be piling more
> difficult-to-reason-about mechanisms on top before reeling in exotic host
> objects. With Proxy out of the bag, I'm not so hopeful for the humble Object
> anymore.

As far as I know, without Proxy or Object.observe() there would be no
possible way to watch for changes *as they happen* and directly fire
off an observing function or handler.  You need assistance from the JS
runtime to track stuff like this correctly and efficiently.  The
polyfills for O.o() use timers to watch for changes - changes/accesses
can be missed between polls.  I am happy Proxy is at least staying
around - I was initially freaking out thinking Object.observe() was
the mechanism behind Proxy's magicalness.


More information about the es-discuss mailing list