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

The overall api is strange. The each loops are backwards from the spec (key, value) instead of (value, key) and there are instances where it is key, value in jquery, there are instances where method names just don't make sense (I'd expect something like size to be dimensions etc), getters and setters as the same method, way too much argument overloading, inconsistent approach (selector.action, but wrap is the opposite of how the rest of the lib works). There is no kind of inheritance for their plugin architecture.

These are just things off the top of my head. I feel like jQuery is the same as PHP when it comes to api, and I make a living doing PHP.



jQuery.map() jQuery.each() having their arguments has caused me more than a few WAT moments.

One way I solve the issue around overloaded apis is by not using them. I just pretend .click() and friends just don't exist.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: