

Ask HN: Why do JavaScript developers don't focus much in optimising algorithms? - itsbits

I have seen lot of frameworks like Angular, Ember etc doesn&#x27;t do optimal execution way. Is there any particular reason?
======
lollipop25
"Optimal" is very broad. Optimal in one aspect might not be optimal in another
aspect.

For instance, Ember and Angular in my opinion is optimal in terms of
convention. Follow convention, and you can write apps in less time. Break
convention, and you aren't "optimal".

React with Flux is optimal in terms of predictability of an app's behavior.
One can simply eyeball the data and code and say "oh, this should happen if
this is put in". Break this architecture, and you're in for unpredictable
apps.

jQuery is optimal in terms of cross-browser utility APIs. However, if you find
yourself falling back to vanilla, then your code is not "optimal" in terms of
cross-browser compatibility.

Execution isn't the only aspect people care about. It's what they call
"abstraction" and abstraction has its tradeoffs. Otherwise, we'd all be
writing vanilla JS and sacrificing what matters most - getting things done.

