4 ms·
Citation needed for not behaving like you expect on first touch. I very very much doubt that most people's first touch of writing javascript included writing c
by mattlondon 3y ago
Citation needed for not behaving like you expect on first touch. I very very much doubt that most people's first touch of writing javascript included writing contrived syntacical-gotchyas like `+!!NaN * "" - - [,]` (example 25 on jsiswierd.com)... unless of course they are perl coders :)
Yes there are a few weird things around true/false evaluations and other syntax "gotchyas", but they take at most 5 minutes to grok the ones that actually come up in normal day-to-day coding, and many of the other things that people like to flag up (like scope in blocks/functions) are often the same in statically typed compiled languages too - there was a blog post from golang just recently about a "common mistake" around scoping of variables in loops etc for example (sorry cant find link). Don't even get me started on Python's weirdness.
What I am saying is there are many ways to shoot yourself in the foot in any language - you'll "get burned" in anything that you don't really understand. First-touch of rust without really knowing the language that well? First-touch of c++ without really knowing the language that well? Have fun not getting burned with those until you have studied a proper rust/c++ course that tells you precisely all of the traps. It turns out that you need to know about a programming language to use it effectively.
And for what it is worth, modern ECMAScript does not need a transpiler - it executes directly in the browser without any molestation. Typescript requires transpilation to javascript before execution, but you can get a long way without typescript if you want to without sacrificing too much besides types (and tooling these days for standard ECMAScript is excellent)
I think that maybe perhaps you are confusing javascript with browser-based frameworks like React? React and NPM are a total dumpster fire of awfulness, but they are not javascript.
I'd encourage you to give modern, native ECMAScript another go.