Hacker News new | past | comments | ask | show | jobs | submit login

Personally I don't see why I would go back to using classes. IMHO, classic OOP doesn't fit to modern JS. I guess it's good to have the option though.



> IMHO, classic OOP doesn't fit to modern JS.

ES6 classes aren't "classic OOP", they're syntax sugar for regular prototypal inheritance that JavaScript has had forever.


"Modern" JS simply didn't have classes, so classic OOP couldn't fit. People still tried a million different hacky ways though (eg; `React.createClass`). I'm disappointed with the implementation in this case (no mixins??) but the idea of going to classes now that we finally can makes sense.


>I'm disappointed with the implementation in this case (no mixins??)

The point is moving mixin handling to userland (and eventually some sort of standard?), if I understand correctly. It's not really React's concern.

See also: Minimal API Surface Area http://www.youtube.com/watch?v=4anAwXYqLG8




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: