|
|
|
|
|
by raziel2p
4131 days ago
|
|
Some of the code examples given here are perfect examples of what I hate about javascript. assign(new Dispatcher(), {methodName: function() {}}) Why can't I just define a regular class? Even worse, in the following code snippet the arguments seem mismatched with the previous one: assign({}, EventEmitter.prototype, {methodName: function() {}}) I can accept this sort of thing if the payoff is high, like getting access to the performance and simplicity of virtual DOM operations in React, but these examples just seem to be to create basic objects. Maybe object-assign is one of the javascript best practices that keep changing every 2 months and I'm just not paying attention enough? ES6 can't come soon enough. |
|
[1] https://github.com/goatslacker/alt/blob/master/examples/chat...