Re:Using ES7 Decorators as Mixins
by HeyImAlex on Friday June 26, 2015 @07:03PM
(#9788243)
They are the same I think, only one has extra parameters. At least in Python, @fn(...args) evaluates the function first and uses the result as a decorator. The guy who wrote the blog post you mention actually uses the parent's pattern in react-dnd.
Re:Using ES7 Decorators as Mixins
by braythwayt on Friday June 26, 2015 @09:37PM
(#9788719)
The subtext of this article is that underneath all this glitzy new syntax, class mixins are absolutely nothing new. The semantics are the same. The important thing is to focus on the underlying principles and let the syntax evolve as it wishes.
Re:Using ES7 Decorators as Mixins
by huxley on Friday June 26, 2015 @10:46PM
(#9788895)
I've started writing my own ES9 specification to get a jump on the really cutting-edge stuff, it's influenced by functional languages but only ironically.
Re:Using ES7 Decorators as Mixins
by girvo on Friday June 26, 2015 @09:43PM
(#9788735)
Don't stress, while ES7 is exciting (and I'm using parts of it, async/await alone are worth using) a fair bit of it is still up in the air. Unless there are particular features you'd like (for myself that is async/await and decorators), es6 alone is well worth it.
The pattern is
my2c.Just started using ES6 in nodejs and here are people already gunning for ES7. Amazing.
Can you point me to an example without es6 classes?