4 ms·
Go has a lot of advantages. Yes, you are a little bit limmited sometimes because of the lack of generics and the like, but at the same time, if you learn to us
by cube2222 10y ago
Go has a lot of advantages.
Yes, you are a little bit limmited sometimes because of the lack of generics and the like, but at the same time, if you learn to use Go interfaces well, you end up using them most of the time happily. The parallelism primitives are great too.
As much as I love complex type systems, pattern matching, algebraic data types etc., I know that if Go had those things, it wouldn't be the language I love to write everyday anymore.
Somehow, Go is a really practical language and you end up being very productive in it, at least from my experience.
Saying that people who write Go should be stupid is shallow thinking. Complex languages aren't the only complexity that you should have. Some people concentrate on sophisticated architectural design (like Kubernetes).
There is one thing in Go, that I haven't met anywhere else. I can really understand any codebase I stumble upon in a matter of seconds. This is a huge boon to productivity.
Anyways, I never had any problems switching between Go and languages like F# or Scala on a daily basis. Rust looks interesting, though I think it will end up being too complex for a lot of people to understand, which will hinder its growth.
- pka 10y ago> There is one thing in Go, that I haven't met anywhere else. I can really understand any codebase I stumble upon in a matter of seconds. Care to elaborate a bit more? I understand that when you see for(...) { b[i] = f(a[i]); } then you instinctively know that it's a loop that maps over some sequence, and so on. But let's say you have a 50-100kloc codebase with a 100 files in it. In what unique to Go way does Go help you understand the big picture/coarse architecture of such a project?
- cube2222 10y agoOh, that it doesn't. I meant smaller parts of code, and not for loops actually. (I prefer maps, filters etc.). Things like gofmt and the simplicity (in that, small number of concepts) of the language lead to most people writing fairly idiomatic code. This way most codebases look the same and you read each other's code as it were yours.
- matwood 10y agoI'm just getting into Go and have found what you said to be true. It's easy to read other people's code on GH (Java is much the same way). Compare that to something like Scala, where no ones code looks the same.
- cube2222 10y agoCheck out sourcegraph, it's great for reading Go and Java code and has a GitHub integration.
- Elrac 10y agoI'd like to echo what you said. I tend to be a victim of analysis paralysis, spending hours thinking up the most clever design. Go offers far fewer alternatives so there goes the temptation. Given a smallish task, I simply sit down and grind out code, and a couple of thousand lines later I have a simple, self-contained executable that does what I wanted to do. I feel there's a kind of magic in Go's brute simplicity.
- kasey_junk 10y agoHonestly the biggest thing go has going for it is gofmt. Its one of the few things I miss when I work with other languages.
- cube2222 10y agoI think it may actually be the thing I miss the most. (together with implicit interfaces)
- efdee 10y agoDoesn't every semi-decent IDE have an option to reformat your code? What makes gofmt so special?
- cube2222 10y agoThat all code is written the same from the get-go, and you can readily browse it in places like github, etc.
- AlphaSite 10y agoMy biggest problem with it is implicit interface. I genuinely despise that about it.
- cube2222 10y agoWhy don't you like implicit interfaces, it's the feature I love the most actually?
- tonyedgecombe 10y agoI like it as well although I can see there would be times when you might want to be explicit.
- cube2222 10y agoI understand, but why would it be the greatest issue to despise, I'm just curious.