3 ms·
I completely agree. As an amateur programmer, I started with JavaScript before moving to Python. Even now, many JavaScript patterns seem nonsensical to me. (/r
by thrdbndndn 2y ago
I completely agree. As an amateur programmer, I started with JavaScript before moving to Python.
Even now, many JavaScript patterns seem nonsensical to me. (/rant on)
The infamous callback hell, the IIFE, and the default-to-async behavior (when using outside the browser), are look like anti-pattern to me in most of cases. I understand there benefits, I just don't think they're worth it.
The syntax doesn't help either—after getting used to Python's simplicity, the excessive use of parentheses and brackets alone is off-putting.
For something as simple as iteration, there are countless methods, yet none of which are particularly appealing (and I don't why someone thinks it's a good idea to have both `for of` and `for in`).
You can't even iterate over some common object types without resorting to things like `[...someList].forEach` or `Array.from(someList)`. This should be built-in, even just as syntactic sugar.
To make matters worse, a lot of professional JavaScript code seems intentionally written to resemble a puzzle rather than a straightforward workflow.