Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The first example alone is reason enough to use jQuery - why would I want to use four statements instead one? Why would I want to have to remember to call `send`? Why do I have to remember the last boolean parameter of `open`?


If you are writing a library, eliminating a dependency is worth much more then 4 lines of code.

But yeah, if you are just writing code for your own site then knock yourself out.


Totally valid, but just to say, jQuery's API is just as arbitrary, you just happen to know it better. If you use the native XHR a couple times, you know what open's parameters are.


It is just as arbitrary, but I feel jQuery's API is also easier to grok at a glance. Using either a couple times may instill the parameters in your memory, but what about coming back to it after six months?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: