4 ms·
jQuery's find is almost certainly more useful that way though, if not optimally named. I can't understand though why you would claim to dislike jQuery providin
by juliangregorian 11y ago
jQuery's find is almost certainly more useful that way though, if not optimally named.
I can't understand though why you would claim to dislike jQuery providing you a useful 'this'. You prefer to receive the window object?
- rubiquity 11y ago> jQuery's find is almost certainly more useful that way though, if not optimally named. Useful but poorly named isn't useful. > I can't understand though why you would claim to dislike jQuery providing you a useful 'this'. I prefer programming language libraries to work according to the semantics of the underlying programming language. Is that so wrong?
- juliangregorian 11y agoCome off it. JavaScript's 'this' is meant to be usable in such a manner. http://es5.github.io/#x15.3.4.3 http://es5.github.io/#x15.3.4.3
- rubiquity 11y agoUsing bind like that is perfectly fine in application code but I consider that a big violation of Principle of Least Surprise in library code. Nearly every programming language in existence has some feature(s) that you can shoot yourself in the foot with. Does that mean you should do it?
- juliangregorian 11y agoIt's pretty standard practice for JavaScript libs. How much do you actually use JavaScript?