Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Is Learning GO worth It if you know Node.js?
11 points by lifeplusplus on April 26, 2021 | hide | past | favorite | 11 comments
Nodejs = you can build apis

GO = you can build apis but they're faster

Rust = new C++ and really fast

it seems to be best supplementary language combo to learn would be

Go/Rust or Nodejs/Rust

this way you know one good web/api language and one really efficient language.




Given infinite resources (time and energy), everything is worth learning.

Having said that, it depends on what you want to build.

In my opinion, Go is great for building command line applications, infrastructure applications (Kubernetes and related stuff), your own database, a DNS server, or anything you would otherwise use C/C++/Java? etc.

If the answer to the question: What would I write this in if Go didn't exist? is C/C++, etc... then Go is what you're looking for. If the answer is Python, Ruby, php, etc... then node is a better fit (compared to Go).

For building Web Applications, and web realted APIs, again in my opinion, what you need to focus on is in the ecosystem, not the language. You need to focus on the libraries, the frameworks, the tooling, the editors, the ORMs, the validation libraries, etc, etc.

In this regard, I think the node ecosystem is a lot more suitable. You might need to do scraping of other websites, generate PDFs, access a database, render a preview from an url to an image, etc. Node has an infinite amount of useful and popular libraries for all web stuff.

At my previous job everything in the backend was being rewritten in Go. The inseane amount of reinventing the wheel and wasting time on things already given for free in other ecosystem was astounding. To me an extreme example of this was the "We dOnT NeEd OrMs iN gO" and then see the team suffering weeks to do the right migration statements in SQL files executed by custom bash scripts and creating manual CRUD queries for trivial data which, with the Rails ORM, the Django ORM or Prisma.js would be literally 30m of work, migrations and deployment included.

But hey, Go is so fast! So go ahead with Go if you're already FAANG scale.


this highlights important practical implications of choosing stack that has advantage in one area but then lacks in another, packages, and then paying for it. I'm not FAANG and dont need it. In fact, now that I think about it, I should be building stuff, not learning new programming languages.


Depending on what you do, Go will suffice for 99,999% of use cases. Since I know Go, I would never start another project in Node. Also, I would never reach for Rust except for very specific cases when low level control over memory is needed. And that means probably never.

Since I value simplicity, productivity and ease of deployment, I would say that Go is the best server language out there.

Now, if you‘re learning for the job market, probably Node is king, even though Go is constantly gaining popularity.


I switched from Node to Go half a year ago; tooling is incredible and the fact that the output is a single static binary is just so much easier to handle from a DevOps endpoint. The language itself is also incredibly simplistic, which means that I sometimes miss `.map`/`.reduce`/`?` etc - but the tooling and the fact that _everyone_ understands Go code when they read it is just awesome.


You can learn Go very quickly because it's simplistic.

Learning Go and implementing a micro-service made me appreciate more modern JavaScript/TypeScript in NodeJS, but that's my personal tastes.


I find Go much more enjoyable to code than the Javascript/Node. It's not just the language... the entire javascript ecosystem is so chaotic and all over the place compared to the smooth ocean that is GoLang.


For backend, most languages are acceptable, and depends on your team and personal preference.

Python will do the job. Java-shops still chug along. Go-lang is nice. Node-js is fine.

Personally, I prefer javascript to GO, as it is more expressive language, and because you have it server-side, you dodge most of its browser-side warts.

But if you plan to run in the Kubernetes ecosystem, Go has some nice things, and is usually simple and has the 'one obvious way to do it' vibe.

I used both GO and Node 'in anger', and one was not obviously better than the other.


Honestly Java has come really far and is actually not the worst to write anymore. Lots of new language features being added all the time.


Like, I wouldn't mind. Only thing that would kinda stop me would be fear of of the buildsystem, I remember fighting heaps of xml configuration for maven and ant ~10 years ago, so I hope that got better :)


I personally haven't had any trouble with Maven but that's after beating my head against it for ~5 years... It feels nice and comfortable now. :')


Imo it depends on what you mean by "faster".

As a node dev, if I'm chasing performance I'd look for libraries with c++ bindings, like uWebSockets[0] for example.

NodeJS internal apis also got cluster and worker_threads which are handy when distributing workload in multiple cores.

On the other hand if you're talking about faster dev speed, nodejs is ok too since i can reuse some modules in backend and frontend.

Of course golang has advantage in terms of types (i abuse assert in nodejs to makeup for this) and performance (i throw money on hardware instead, if really needed), but question is do you really need those right now? The answer greatly varies per project.

[0] https://github.com/uNetworking/uWebSockets.js/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: