Hacker News new | ask | show | jobs
by TheAceOfHearts 3363 days ago
Ultimately, it's because it's easily approachable and it mostly works. You can learn JS and do stuff on both node and the browser. That's incredibly powerful.

Debugging node has gotten much better as of the last year. [0] You can use Chrome Dev Tools to debug node! I'll admit I've had limited experiences in this area, but so far Chrome Dev Tools has provided one of the best debugging experiences I've had. The killer feature is that it's easy to get started and gradually pick more stuff up as you go along.

JS syntax sucks? That's subjective. After learning functional languages like Elixir and Haskell, I agree that JavaScript is lacking many nice features. I don't hate or dislike JavaScript, though. To help solve this, have you tried out macros? [1] I'll admit I've only looked lightly into the feature and I haven't given it a very serious try, but it looks quite promising.

NPM is filled with a lot of junk. That's pretty accurate. You need to be incredibly diligent when pulling in dependencies. Make sure your dependencies are well tested and not bloated and overly complicated. Have you had a better experience with other languages? I can't say I've had any more luck with other languages. From an outsider's perspective, I think Go and Rust seem to be maturing quickly, but I haven't used either seriously enough to answer with confidence. If I'm hacking something together, I think using node is an amazing choice; if I'm looking for incredibly long-term support, I'd probably use Java (as much as I dislike it).

[0] https://nodejs.org/api/debugger.html#debugger_v8_inspector_i...

[1] http://sweetjs.org/