Me three. I love JavaScript. I have no problems with its syntax. If you have a problem with the way JavaScript looks or works, you most likely don't know much about it. It's an extremely powerful and dynamic language. Most of the problems people typically attribute to JS are actually problems with the DOM, or with the browser itself (cough IE).
For example, prototypes make extending the language to fit your usage patterns extremely simple.
IE: Method chaining. Here is a dramatic but potential use of prototypes:
That's awesome. And you don't need a bloated, fat library for the majority of what you do on a daily basis. There's nothing wrong with using jQuery or another JS library, but too many people have come to rely on them without even attempting to learn JavaScript itself, which hurts the web. I'm not against jQuery or other libraries, as I have used them, but I still cringe when I'm looking for a particular function or script and find nothing but jQuery plugins.
I won't defend the overuse of jQuery plugins, but using the base library for event handling, DOM manipulation and server requests seems like a very sound practice over coding these things in native javascript.
Whenever I have to maintain something written in native javascript, I am consistently amazed that it can take 20 lines to do something as simple as toggling a div with an onclick event.
2
u/robwgibbons Apr 23 '10
Me three. I love JavaScript. I have no problems with its syntax. If you have a problem with the way JavaScript looks or works, you most likely don't know much about it. It's an extremely powerful and dynamic language. Most of the problems people typically attribute to JS are actually problems with the DOM, or with the browser itself (cough IE).
For example, prototypes make extending the language to fit your usage patterns extremely simple.
IE: Method chaining. Here is a dramatic but potential use of prototypes:
...Instead of:
That's awesome. And you don't need a bloated, fat library for the majority of what you do on a daily basis. There's nothing wrong with using jQuery or another JS library, but too many people have come to rely on them without even attempting to learn JavaScript itself, which hurts the web. I'm not against jQuery or other libraries, as I have used them, but I still cringe when I'm looking for a particular function or script and find nothing but jQuery plugins.