What’s a use case for jQuery over vanilla JS?
When most code is and will be written by AI, why would I sacrifice performance for syntactic sugar?
Vanilla JS only works with a recent browser. JQuery works with old garbage people never updated.
Valid questions. In jQuery's case it's still so widely used by older codebases that it makes sense to improve and keep maintained. I think it's important to have alternatives in any case. Some people still prefer to write code by hand, and some people prefer jQuery.
I wouldn't say there are _many_ use cases, but "LLM is writing code in a legacy codebase without heavy refactors" fits your question.
Same reason we've always sacrificed performance for syntactic sugar. Readability and maintainability are the big ones. If you trust your AI to get it right, sure I guess that doesn't matter.
Serious question: On modern hardware how much performance is jQuery actually taking away from you? Compared to the ridiculous overkill factor of using React for simple static pages, a practice I see everywhere now, the time it takes jQuery to parse seems inconsequential.