4 ms·
Excited for the release, but disappointed in the embracing of OO programming in Javascript. Object oriented programming is a poor way to express logic and gets
by kuni-toko-tachi 12y ago
Excited for the release, but disappointed in the embracing of OO programming in Javascript. Object oriented programming is a poor way to express logic and gets away from the beauty of languages like Javascript (and Perl) - functional composition.
I deeply regret the day when all job postings for Javascript say "Looking for an object-oriented Javascript developer", since like lemmings companies think object-oriented programming is a good thing.
- ufo 12y agoOO tends to work pretty well for widgets fwiw.
- danabramov 12y agoI don't get why your parent is being downvoted. React's position is to avoid inheritance in favor of composition: https://github.com/facebook/react/issues/613#issuecomment-29280175 https://github.com/facebook/react/issues/613#issuecomment-29... This hasn't changed. The change in 0.13 has nothing to do with inheritance though. It's neither about classes nor about ES6. I wrote a comment explaining why: https://news.ycombinator.com/item?id=8959691 https://news.ycombinator.com/item?id=8959691
- jowiar 12y agoAll the React code I've written tends to be much more functional/declarative in nature than OO. When writing web frontend code, there is the giant blob of state known as the DOM that has to be dealt with in some way. More than anything else, React allows you to treat the view as "create a function that transforms data into DOM elements", handling the state diffs itself.
- kuni-toko-tachi 12y agoWhen MVC is expressed as a composition of functions - whose purpose is data transformation, it is an absurdly simple concept. Only MVC described in object-oriented terms is "hard". view(controller(model0,event0)) = representation