Hacker News new | ask | show | jobs
by throwayedidqo 3363 days ago
I can't figure out the circle jerk around Node. Debugging sucks A LOT, JS syntax sucks, single thread sucks, NPM is filled with 95% junk.

Python, Java, golang, C#, and maybe even PHP have more mature and reasonable stacks.

5 comments

I completely agree. The fact that there are so many abstractions that compile/transpile into javascript is also a big red flag. What other languages do you see that in? And then of course there is the horrible standard library, where the most obvious functions don't exist and require a package and maintainer.

https://mobile.twitter.com/mitsuhiko/status/7126249140717281...

https://www.reddit.com/r/programming/comments/4bjss2/an_11_l...

I find it extremely telling that both of the issues you linked are now included in the core language library, and what happened with left-pad will never happen again after amends were made by npm to make sure that it indeed never does.

If you want to critize JavaScript you can do better with something more substantial. If anything, the speed at which problems you linked get remedied is a plus for the language. Even more so if you take into account the extremely unique position JavaScript is in where you can simply never change an API after it goes public.

> The fact that there are so many abstractions that compile/transpile into javascript is also a big red flag

What did you expect? JavaScript is the only language browsers natively understand. If you want to write code in your favorite programming language you will have to transpile/compile it to JS.

Javascript is the reason WebAssembly came into existence.
That statement is highly uninformed.

I would suggest starting reading from here https://github.com/WebAssembly/design/blob/master/FAQ.md#is-...

I never said it would replace it, I was saying that it was for those who didn't want to use javascript.
No, it really isn't... it's for code that absolutely must perform well, without the need for browser plugin/extension installation. Gaming logic, transcoding streams, etc.
Aren't there a lot of languages that compile to the Java platform? Also, there are several that build for .Net as well.
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/

What you stated IS the circle jerk. I can't come to a single thread mentioning node without 1/4 of the comments being your complaints.
I'm with you on NPM and the JavaScript language, but suggesting that Node debugging "sucks" is sure indicative that you've chosen to ignore the available tools - it is one of the only dynamic languages where post-mortem debugging is possible _at all_.
I don't have a lot of love for node.js or depending on npm but debugging? I have not had a problem using webstorm.