@mjackson @ReactJSNews I agree, but is there a good reason not to use them other than mixins?
-
-
Replying to @Keith_Rousseau
@Keith_Rousseau it's the same old "composition vs. inheritance" discussion we've had for years now. Always prefer comp. Simple@ReactJSNews1 reply 0 retweets 0 likes -
Replying to @mjackson
@mjackson@ReactJSNews Right but there's no reason you can't use composition with classes. Decorators provide a nice way to do that2 replies 0 retweets 0 likes -
Replying to @Keith_Rousseau
@Keith_Rousseau the fact that decorators are a thing in JS is testament to the limitations of class.@ReactJSNews1 reply 0 retweets 0 likes -
Replying to @mjackson
@Keith_Rousseau decorators solve a problem that didn't even exist before we started using classes.@ReactJSNews4 replies 0 retweets 2 likes -
Replying to @mjackson
@mjackson manipulating descriptors is not very simple without decorators@keith_rousseau@reactjsnews1 reply 0 retweets 2 likes -
Replying to @sebmck
@sebmck can you please show an example of what you're talking about? I assume you're talking about prototypes@Keith_Rousseau@ReactJSNews2 replies 0 retweets 0 likes -
Replying to @mjackson
@mjackson https://babeljs.io/repl/#?experimental=true&evaluate=true&loose=false&spec=false&code=function%20enumerableMethod(target%2C%20key%2C%20descriptor)%20%7B%0A%20%20descriptor.enumerable%20%3D%20true%3B%0A%7D%0A%0Aclass%20Foo%20%7B%0A%20%20%40enumerableMethod%0A%20%20foo()%20%7B%0A%20%20%20%20%0A%20%20%7D%0A%7D%0A%0Afor%20(var%20key%20in%20new%20Foo)%20%7B%0A%20%20console.log(key)%3B%20%20%0A%7D …@keith_rousseau@reactjsnews1 reply 0 retweets 0 likes -
Replying to @sebmck
@mjackson Decorators aren't even class-specific so the "only fixes a problem classes introduce" argument fails@keith_rousseau@reactjsnews1 reply 0 retweets 1 like -
Replying to @sebmck
@sebmck i said that in response to "decorators give you composition with classes". don't take it out of context@Keith_Rousseau@ReactJSNews1 reply 0 retweets 0 likes
@mjackson You were making a pretty blanket statement about decorators being driven by class limitations. @keith_rousseau @reactjsnews
-
-
Replying to @sebmck
@sebmck 140 chars, my friend :) i didn't mean it that way@Keith_Rousseau@ReactJSNews0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 