I have been a developer for around 10 years.
In the last few years I've been using especially Javascript and Scala for web development and data processing, I love functional programming.
There is a huge hype now around Go and the popularity is growing.
I am thinking giving it a "go" :P
Let me know what you think, pros/cons, anything...
Top comments (48)
My situation was quite similar to you, I was born for this question.
Overall had about 8 years experience at the time, about 4 of which was Scala.
I really love(d) Scala, wonderfully expressive, so much to learn about category theory and generally how to write software in a very "sound" way.
But it's not without it's problems right? It's hard in a big team because it's a difficult language where there are about 10 ways to write something. A lot of bikeshedding will occur on teams when one side thinks you should use Akka, another play, etc etc. Plus the compilation times are quite slow and the tooling around it is difficult and awkward (sbt).
The project I was working on had a fairly extensive test suite, coupled with the compilation times I could be waiting 15 minutes for a full build.
Whilst playing foosball was fun I eventually started learning Go in between the builds. (yes, really!)
Go, for better or worse is almost the opposite of Scala
So what's it like for a Scala developer writing Go?
You'll love the feedback loops, but you'll hate writing loops. There's no generics (yet, but they are planned) so you have to write a lot of code you wouldn't have to in Scala.
The ability to build abstractions is far lower than Scala. So you'll end up writing what you'll consider boilerplate. Still you'll end up writing a lot less than you think because the standard library is excellent. Compared to the baggage around the JDK and whatever libraries you choose to bring in the overall cognitive load is a lot lower
Have a look at this todo server code
This is something I hacked together last week. Yes there are for loops. But that is all the code that is needed. You can build that one file and deploy it and you have your web server. No dependencies. All very standard Go that you can find tutorials on how to write it. I didn't have to think at all.
For me, learning Go made me re-evaluate what's important about a programming language. Syntax and expressiveness like in Scala are nice traits and have their uses but a language's ecosystem has a much bigger impact on your ability to just ship stuff. To this day I still have more experience writing Scala than Go but if I was making a product for myself I would pick Go in a heartbeat because it just makes producing robust, fast and simple to maintain software easy
I read somewhere that Go developers "just get the shit done".
By reading your comment I can understand that this is actually the reality.
Sounds like that we are very much a like experience wise and I am totally familiar with what you describe.
Thanks!
great answer!
When you ask this sort of question, you're likely to get two types of responses:
Developers for whom Go is a pet language. They'll love it; they'll go on and on about how wonderful it is. Don't get me wrong, I'm sure all the sterling qualities they tell you about will be totally 100% true. Thing is they won't mention the sharp edges and/or the places where the language isn't so great.
The other responses you're likely to get are those who despise Go for whatever reason. They'll point out all the weaknesses of the language--"No interfaces? Are you f***ing joking?"--stuff of that sort. I don't think they'll give you much of a balanced and considered response either.
In short while I understand the desire to figure out if it's worth your time to invest in Go, I think posting the question here is probably the least good way to figure out if it's worth your time. Play with Exercism.io. Look at the number (and quality) of questions asked about the language on Stack Overflow. Try to write something beyond the typical "Hello World" with it and see how it feels.
I have found over the years that chasing the new hotness when it comes to programming language is really a fool's errand. No one knows what will prosper, what will become a footnote and what we all wish would die off already (VB6 anyone?) Learning new stuff is definitely great and I totally agree with you on that. But trying to decide what you should learn based on what's "the next big thing" is sort of foolish. I can't tell you what I'll be working on six months from now. It takes years for a language to develop enough of a following for there to be good jobs writing it. Therefore I think trying to predict what's worth learning based on future job prospects dictates that <sarcasm> we keep on with C# and Java </sarcasm> unless we're really willing to play the long game.
Just my humble opinions of course.
Actually I was looking for the extremists to show up. This way you learn the most about the best and worse of the language.
The language isn't going to change much from what it is now. They will add generics and improve error handling. They will finalize the packaging system. That's it. Don't expect it to change for many years.
:) Then I suspect you're already getting what you wanted!
+1. One of Go's main selling point is being very easy to get into - so just get into it and form your own opinion!
Go is definitely going to be a big deal for years to come.
I also feel like the Go ecosystem touches on much of the most cutting edge techniques in distributed systems, so I feel like learning it gets you closer to some really interesting things (which pay a lot!)
Gophercon also looks like one of the great software conferences.
I know some Go and have enjoyed the basic experience, but I can't speak too much to the actual language other than second-hand accounts. Haven't gotten that deep.
Could you give an example to cutting edge techniques? Like event sourcing and such?
If you've not learned a system level language before, like C or C++, then learning Go is probably a good idea. I have no idea what the language is like, but I'm assuming it exposes concepts you've not yet been exposed to. Even if you end up not using Go, learning new concepts will help you in whatever direction you go.
Don't pick it for hype though. Pick it for learning. And don't hesitate to drop it if isn't helping you in some way.
I have been a C++ programmer for a few years so I know what system level language is like and the whole concept, I actually I like it.
I am not choosing Go because of the hype, I am trying to figure out if there is something behind this hype. The one thing that really caught my eyes is the amazing performance of Go due to the fact it's a system level language.
I believe a lot of the hype is sadly due to it's "concurrency" model which is now a buzzword which also ends up getting conflated with another buzzword "parallelism".
Go is definitely a SOLID language (pun intended), but it does have it's warts:
var
I do think...
Personally, I really enjoy writing Go (for work and play) and being apart of it's community (for work and play).
That's what I did, I steered clear of it for a long time because of the hype, now I'm still unsure if I like it because I like it or if I like it because I'm learning something different from the day to day. I'll get to the answer eventually
If you're interested in some harsher views of Go I recommend this article, particularly when the author cites Rob Pike.
Myself I've used Go to rewrite a few webservices. Now that I have, I'm considering rewriting again back to node.js or python. Go's just doesn't offer enough safety advantages to warrant its opinionated style constraints - which often violate gestalt principles - or its unwieldy syntax.
To me, Go appears to be created to satisfy a political/marketing goal rather than a technical one, namely to (a) draw programmers from java and (b) allow companies to hire less capable (cheaper) developers, by keeping the language very simple/restricted and forcing certain style choices.
This isn't necessarily bad, it has been proven that teams with diverse level of experience perform best. But I personally feel that Go isn't promoting diversity, it's promoting 'simple' work, as there is no way for 'more experienced' programmers to use the tools they want in Go.
However, based on salaries for the adverts I've seen in my country over the last year, learning Go as a career move does appear to make sense.
I don't know if initially Go was created for marketing reasons or not, but the simplicity and the forced style can be a plus in the long run. All code looks the same, the difference is what the code does, not how it is written in the page.
You can still name functions and variable counter intuitevely to make it obscure :D
I'll go over the post, thanks!
I'm a scala developer and other colleagues are doing kotlin and java. Unfortunately we have a codebase, from an external company working for us, with 75% Go code, so we have to handle that. Luckily I have not done so much until now, but I can hear my colleagues crying out a least twice a day "What a shit is this?". Maybe the code is bad, structs are copy&pasted, error handling is primitive and the lack a high level programming language features. It's good for a quick hack like importing data.
Maybe you should have a look on Rust. Same performance but a lot better designed.
You made me laugh imagining your colleagues shouting out loud
Like any tool, Go has pros and cons, use it where it shines the most.
Notice: some of these pros/cons in and of themselves are not unique to Go, but the combination with others is what sets Go, as a whole package, apart from other languages.
Pros:
Cons:
There are Go Surveys for 2016 and 2017 that may reveal some additional insights into what the Go community thinks are the pros and cons of the language.
I'm in the camp saying that no generics is a huge missed opportunity, especially because it wouldn't be that difficult to add and IMO doesn't make the language that much more complicated to learn (hardly, I would say). No generics means we're still coding old-fashioned "for" loops all the time, instead of using the powerful data manipulation abstractions (map, filter, reduce etc) which virtually every other modern language offers. Go is nice, but give us generics and it will be a dozen times nicer!
oh i thought go was an evolved py, i think that package story showed some different thing
I think you should learn Go as it's the exact opposite of Scala but it teaches your classic procedural programming. I'm now learning Scala and Scheme after learning Go as I feel that I need to learn more about functional programming
The only problem is that I love functional đ
You can do a bit of functional programming in Go: medium.com/@geisonfgfg/functional-...
Well If you can be contented with closures but no lambdas , explicit type specification in functions, no sum types etc. you will be fine!
Yes! You absolutely should learn Go. It's probably my favorite programming language, so I may be biased, but I adore the top notch and frankly first class support for multi-threading and concurrency.
It's actually caused me to start developing my applications significantly differently (I may write an article on my "layer-cake" design theory at some point in the future)
Sounds interesting, looking forward :)
It isn't and that's a very diengenous comment.
Go is a type-safe (unlike C) general purpose language with a garbage collector which for 99% of problems out there are very useful. For sure if you dont want GC use C or Rust.