8 ms·
Really, coding in JavaScript is hardly worse than most other languages.
by wprl 12y ago
Really, coding in JavaScript is hardly worse than most other languages.
- MrBuddyCasino 12y agoSo that means that either JS just isn't that bad, or most other languages just aren't that good.
- wtbob 12y ago> Really, coding in JavaScript is hardly worse than most other languages. See, that's the really sad thing about JavaScript: it's a Blub. In addition to JavaScript, I've written C, Python, Ruby, Perl, Go, C++, Java, Common Lisp, Scheme, HyperTalk, Visual Basic, Lua and shell (I'm probably forgetting something). I've played with Erlang and Haskell. Every one of those is better than JavaScript. Most are much better than JavaScript. What are my issues? Well, there's the whole hasOwnProperty hack when iterating over an object used as a hash table. Then there's the default variable scoping. Then there's == vs. ===. The default fallthrough in switch. The lack of integers. The goofiness of details of the object mode (I'm not objecting to prototypal inheritance; I'm objecting to the myriad subtly different ways to do prototypal inheritance). The lack of a metaprogramming facility. The lack of a standard package or module facility and its consequent explosion into a myriad subtly-different systems. And there's the callback hell of the browser runtime, but that's not necessarily JavaScript's fault. When I write JavaScript, I feel like I'm back in the bad old days of C, where a single error will be undetectable by the compiler and result in simply a core dump, leaving my to single-step through my code looking for what went awry. If it weren't The Language of the Web™ it'd be about as popular as Befunge.