3 ms·
Conversely, looking at how you do it through jQuery after seeing how it is in Javascript gives me the same reaction. The fact that jQuery is usually assigned t
by Kaze404 6y ago
Conversely, looking at how you do it through jQuery after seeing how it is in Javascript gives me the same reaction.
The fact that jQuery is usually assigned to the dollar sign definitely doesn't help, especially for beginners. The amount of questions I've answered that stemmed from a fundamental misunderstanding of how Javascript works, all because they learned jQuery instead of Javascript, is pretty significant.
- mettamage 6y agoI remember when I was in uni that the $() must've had a special meaning or something. I was pretty convinced that the $ was some tough mathematical operator or computer science concept that I didn't yet understand. When I learned that it was simply a function invocation that returned a jQuery object so you could chain it, I was absolutely shocked about the simplicity of that statement. Beginning developers sure like to project their cognitive insecurities onto programming. Or at least, I did :)
- macintux 6y agoThere's so much magic in programming that as a beginner, it's hard to know which magic you should dig deeper into, vs which is such a treacherous rabbit hole you're better off cargo culting.
- bigfudge 6y agoIt think this is true of many technical things. Statistics, sailing, car mechanics, photography... What I love about HN is it often gives clues as to which are the interesting rabbit holes.
- cosmotic 6y agoThat argument stands true for most frameworks on most platforms. I prefer the dollar sign; it's pervasive and concise.
- Kaze404 6y agoI disagree. There's nothing about React, Vue or any other framework that I'm aware of that does anything similar to jQuery's dollar sign. The only magically-looking abstraction I can think of is JSX, and that's not only not mandatory but very obviously something that's off the curve. Unlike the dollar sign, which just looks like a special construct of the language.
- Xevi 6y agoSvelte uses the dollar sign. https://svelte.dev/tutorial/reactive-declarations https://svelte.dev/tutorial/reactive-declarations