Rick Waldron (2013-07-11T01:28:22.000Z)
domenic at domenicdenicola.com (2013-07-16T14:32:05.359Z)
On Wed, Jul 10, 2013 at 7:27 PM, Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote: > ```js > false.hasOwnProperty('whatever'); > 1.0.isPrototypeOf({whate:'ver'}); > 'string'.propertyIsEnumerable('whatever') > ``` > these are already examples of an over-polluted prototype with methods > nobody uses ... I thought 4 extra methods everyone is using same way except > for Rick that honorees Tesla in this day would not hurt much but once > again, my point is that it's really about the time to put some standard > mechanism to deal with events in ES code. > > The fact Object.observe is already accepting a handler with an argument > which is fired as an event smells to me ... I'd rather define upfront a > common definition of handlers then propose any extra method based on them > ;-) But they're different things entirely. Object.observe is an implicit invocation, observer pattern (some may accuse me of being redundant there, I forgive them) that announces the relevant states and state changes in the life of an object.