41 ms·
It's such a weird world. If jQuery was new, people would be all over it for its nice syntax. But since it's old people say we should get rid of it.
by maxxxxx 8y ago
It's such a weird world. If jQuery was new, people would be all over it for its nice syntax. But since it's old people say we should get rid of it.
- acdha 8y agoI think there’s also a factor of doing so much which has now been standardized in browsers: imagine a hypothetical jQuery 4 which mostly focused on DOM/CSS compatibility and used native ES6 where possible, always using the standard names and signatures for things which are only partially supported. I think that’d help people focus on the more ergonomic parts rather than whether you type each or forEach.
- maxxxxx 8y agoWhen I look at the examples and seeing how verbose some of the natives examples are I would probably end up writing something similar to jQuery to keep the main code simple. Maybe that's the way to go.
- acdha 8y agoThat's what I was thinking — imagine if you started now with things like the ES6 array & NodeList methods, etc. as the model to follow and built the same convenience methods without needing to deal with horrors like the IE6 DOM. $(foo).css("color") would still be useful but you might end up with $(".foo").forEach(…), $(foo).classList.add("foobar") or $.fetch(…) to reduce the number of new nouns and verbs a developer needs to remember.
- fatnoah 8y agoThe world is indeed strange. I remember the dark days of getting a robust client-side UI, complete with AJAX, drag and drop operations, etc. working properly in both IE and Netscape. jQuery seemed too good to be true when it first came out.