3 ms·
I don't think your question makes much sense - you aren't going to get very far if you can't or won't distinguish between a language and its common libraries.
by tjarratt 16y ago
I don't think your question makes much sense - you aren't going to get very far if you can't or won't distinguish between a language and its common libraries.
One thing I will concede is that using vanilla javascript to manipulate the DOM is very, very painful, which is exactly why libraries like prototype and jquery exist - to help make this less tedious and to make your experience, as a developer, more pleasurable and faster (as well as for your code to be DRYer, but that's just an added bonus, I'd say).
When you say "if javascript (were) jquery...", I can't help but think you don't understand jQuery. It's a library for javascript. Would you say "If Ruby were Rails then ..." ? No, you wouldn't, because Ruby on Rails is built on top of the language, just as jQuery is built on top of javascript.
Sit down sometime and read the source of jQuery and you will very quickly see that javascript is a really cool language that you can do cool stuff in. If jQuery doesn't float your boat, then maybe you should look at underscore.js - there is a very good annotation for it linked off their website.
- jberryman 16y agoI understand the concept of a library. What I don't understand is: JavaScript was designed as a domain-specific language, yet performing the most common tasks that it was designed for (manipulating the DOM)is, as you say, "very, very painful". If you consider a language's standard library to be part of the language, then it seems like poor language design not to build-in functionality that makes manipulating the DOM at least as easy as jQuery makes it. Thanks for the response, I will certainly peruse the jQuery source.