What is better to learn in 2021, Go or Node.js?
Go. If you need to “learn” something and you don’t know either of those, you should learn Go.
Now, if you had said “Go or JavaScript”, that might change the answer because JavaScript is still the easiest way to directly manipulate the UI on every device.
Even tablets and phones afford JavaScript this ability via PWA’s etc. So, if you are not extremely comfortable with JavaScript in the browser including async/await stuff and promises…then definitely you need to learn JavaScript to that degree.
However, when you are preparing to craft a server application of anything over 1000 lines, I would steer clear of NodeJS and definitely choose Go. You want a statically typed language on your side as a dev.
You want the first class concurrency support that Go affords you as well. You also want the performance. Go is up to 5–10X faster and more efficient with statically built binaries which can be executed with no outside dependencies.
I can write Go code once on a Mac and run one command to produce a native .exe for Windows.
Contrast that with Node where you can't run a single line of code without Node installed on that machine, and all dependencies need to be there too.
Yes, I'm looking at you ugly node_modules baggage folder.Definitely choose Go over NodeJS for big server projects IMO but browser JavaScript is still on its own more valuable than any other technology if you’re a full stack developer.
If you’re just a server/infra dev or already know JS to a decent level then Go for it.
No comments:
Post a Comment