3 ms·
Not sure I'd go that far but it definitely has its warts, like all languages, and developers need to understand what they are.
by ams6110 10y ago
Not sure I'd go that far but it definitely has its warts, like all languages, and developers need to understand what they are.
- DonHopkins 10y agoDon't get me wrong: I love JavaScript, I write piles of it all the time, and I said "was" not "is" because it's been vastly improved since it was originally badly designed, but I still get screwed by accidentally using "this" in the wrong context. It's such an easy accident to make, and it's so hard to see, because when you're looking at code you wrote, you see what you meant to write, instead of what's actually there. Programming languages are user interfaces, and "this" is a user interface dark pattern, an unforced design mistake that doesn't make the language any more powerful, but lays a deadly trap for beginners that also bites pros. It's tricky to understand and hard to explain (this is actually a dynamically bound keyword, not a lexically bound variable), so it's fodder for the thousands of blog posting explaining it like the one we're discussing.