3

Thoughts on Golang?

Submitted by hiddengabber in programming

What do you think about the language? I really adore its philosophy (not bloating itself with too many features noones going to use). For me its as fun to write in as python. I think it's the best backend web programming language.

Comments

You must log in or register to comment.

2

Fossidarity wrote (edited )

A comment from HackerNews hits the spot for me:

I can't speak for Go's genesis within Google, but outside of Google, this underanalysed political stance dividing programmers into "trustworthy" and "not" underlies many arguments about the language.>

This summarises my opinion of Go that has been forming recently, that it's a replacement for Java.

Java was the "safe" choice. Many engineers knew it, bad engineers couldn't be that bad in it and would manage to produce something. They could be handed an architecture spec and implement it word for word without doing much translation to the Java language. But I don't think good engineers could "shine" with it.

It normalised all engineers around some median of productivity, and made projects predictable.

I believe Go is doing the same thing in some ways. It's not supposed to allow good engineers to find great ways of expressing complex architectures (however necessary that may be), it's designed to let engineers of all skill levels hit all problems with a Go shaped hammer and get something that looks inoffensive, boring and predictable.

This is very unsurprising given that it came out of a large engineering organisation. Google have many engineers of a wide range of skill levels, and normalising engineering is more important than doing it better.

I realise Google probably has a higher than average engineering ability, maybe far higher than average, but they still have a wide range, and I also include in this engineers who might be fantastic frontend engineers, who have to get stuck into some system software, for example.

I also think that the areas Go is trying to cover is better covered by other programming languages, for example Rust with system programming.

Also: https://grimoire.ca/dev/go

2

hiddengabber wrote

What about backend and desktop apps? I'd much rather have a golang / java desktop app than an electron one. Rust is great but a garbage collector is a plus in most cases. It doesn't give you a lot of freedom but it's accessible and you don't have to be an even bigger genius to read it than the person who wrote it. In foss programs with thousands of developers it seem more important than room to flex your obfuscated one-liners

1

Fossidarity wrote

I'm also skeptical about anything Google releases as "Open Source", seeing how Android is also "Open Source" but is still rarely accepting Pull Requests from contributors outside of Google. Maybe Go is different but I'll first have to see it before believing it.

2

hiddengabber wrote

I don't think there's much room for telemetry in a programming language. They might not accept pull requests because they don't want to add any new features to the language, just improve what's already there. Golang is not only open source but the licence is pretty liberal so you can fork it. It's a simple program , I don't think it matters it's google

1

Fossidarity wrote

Well yeah they said the same thing about Android and look how that turned out..

3

hiddengabber wrote

I don't think the language is that dependant on Google though. The new versions are supposed to be backwards compatible and the language will barely change. All that's needed are more libraries which Google doesn't make. Yes the origin is shady but it can be a great tool for our community. It's simple, readable and fast so smaller servers will work. It works on every OS, compiles fast so people with bad hardware can compile from source and compiles into a single binary with no need for a runtime so its easy to deploy. It'd be a waste of opportunity not to use it.

1

Fossidarity wrote

Well yeah they said the same thing about Android and look how that turned out..

1

Fossidarity wrote

My thought still hold true for desktop and backend cases, but I agree that I'd rather have a Go/Java app than an Electron one. Actually the point you made about FOSS software with thousands of developers is one against Go in my opinion because Go doesn't have strict language/syntax style guidelines as opposed to Rust, which will result in every library reinventing the wheel like with C/C++ libraries.

2

hiddengabber wrote

Go is super strict. It won't compile if there's an unused variable, unused import or uncommented struct. There are also tools which reformat your code on every save