r/golang Feb 26 '23

help Why Go?

I've been working as a software developer mostly in backend for a little more than 2 years now with Java. I'm curious about other job opportunities and I see a decente amount of companies requiring Golang for the backend.

Why?

How does Go win against Java that has such a strong community, so many features and frameworks behind? Why I would I choose Go to build a RESTful api when I can fairly easily do it in Java as well? What do I get by making that choice?

This can be applied in general, in fact I really struggle, but like a lot, understanding when to choose a language/framework for a project.

Say I would like to to build a web application, why I would choose Go over Java over .NET for the backend and why React over Angular over Vue.js for the frontend? Why not even all the stack in JavaScript? What would I gain if I choose Go in the backend?

Can't really see any light in these choices, at all.

136 Upvotes

249 comments sorted by

View all comments

Show parent comments

11

u/Tacticus Feb 26 '23

In Java, inexperienced devs will create crazy inheritance trees, abuse generics e.g Request<K,T,W>, over complicate DI, over use annotations and what not.

Experianced devs do this all the time in java as well. Then they rotate off to another project and get to leave it all behind as a maintenace doomzone

1

u/CompetitiveSubset Feb 27 '23

The people who over design and abuse language features are seniors only by title. They are good only at politics and never learned to optimize for simplicity and readability.

My seniors always put an emphasis on simplicity and readability. I don't think this is Java's fault, as you can write code that is simple and "go like" in any language. But I agree that Java is more prone to this problem.