Hacker News new | ask | show | jobs
by woah 4317 days ago
The statement about jQuery being more efficient may have been true about some handrolled for loop selector engine in ie7, but modern browsers have the tools we need now.

You can replace most uses of jQuery by aliasing querySelector to $ and querySelectorAll to $$. You lose some of the automatic array iteration stuff, but really, if you were writing good code you would know how many elements you are about to select.

jQuery is a gigantic dependency and it's kind of sad if you need that crutch to write js. Beyond the selector stuff, its promises and xhr stuff is dubious as hell and can be done much better by several node.js libs like superagent and async.js or bluebird.js.

jQuery goes in direct opposition to a composable module-based approach, because it is a massive dependency.

1 comments

Downvote away, but if you've got to load 90kb to alias $, damn.