Every language has things it's good at, and things it's bad at. Where does Go not do well?
Every language has things it's good at, and things it's bad at. Where does Go not do well?
I've said this before, but I think it's a bit dishonest to sell this as a "Google language." It is an accepted language here, along with Python, Java, JS/TS, Dart, and C++. But it is by no means dominant.
To put it another way, it seems if the goal is to avoid working in Go I am better off staying @ Google than leaving. And that's weird, and maybe revealing.
I don't really care that you find that un-constructive, as you can go elsewhere to get people's critiques of the language, there are plenty of them and they come up every time someone posts about Go here. My opinion is certainly not unique on this subject.
If you're going to trash something at least put in enough effort to explain yourself. Otherwise I think this thread was better off without your comment.
I think you might be a little too emotionally attached to Go? I am allowed to have a subjective opinion on Go and voice it in public discussion forum. This is not a scientific paper or journal article.
I would genuinely like to know what your criticism of the language is, but you haven't offered any. The comment you wrote does not add any clarity to the discussion of Go, in fact I think it takes away clarity by relying on suggestion and avoiding grappling with any details. I think it was not a useful contribution to this thread. I'll leave it at that.
If you have to have an answer, he said he's opined on it in the past. Go trawl through his past comments. (Google search might help.)
Blame the cargo cult and hype driven development for that one.
I'd rather not mention the company, even though I did not work there.
And we're talking about migrating from Java..which is extremely well supported and probably the easiest language to hire for..
Described publicly like Dropbox's backend migration to Go: https://twitter.com/jamwt/status/629727590782099456
I could give you tens examples of that, many have been posted on HN.
I was just providing the example the parent post was asking about. And note it's "hearsay" to you only because I didn't name the company and people involved -- because I was told this in confidence -- but this is a major company where I'm from, and their attempt at adopting Go ended up in disaster. Just a data point, that's all.
https://blog.discord.com/why-discord-is-switching-from-go-to...
Discord: haha, no, that's silly! let's spend 100,000x more effort and rewrite it all in another language!
Now, before those of you who learned to argue on the internet extrapolate what I wrote and imagine that I wrote words I didn't write: I'm not saying that Go should never be abandoned for another language. I'm saying that this particular example of this particular choice puzzles me, because of the reasons stated, and ONLY the reasons stated.
Not entirely sure that I have the Go versions right, but that's what I remembered off the top of my head.
> Another Discord engineer chiming in here. I worked on trying to fix these spikes on the Go service for a couple weeks. We did indeed try moving up the latest Go at the time (1.10) but this had no effect.
[0]: https://old.reddit.com/r/programming/comments/eyuebc/why_dis...
It describes a rewrite of a single service from Go to Rust.
Reading between the lines, a rather simple piece of code.
At no point it implies that Discord rewrote all their Go code in Rust and completely abandoned Go.
> Any reason you’re using 3-year-old Go 1.9.2 but you’re okay using Rust nightly?
> Another Discord engineer chiming in here. I worked on trying to fix these spikes on the Go service for a couple weeks. We did indeed try moving up the latest Go at the time (1.10) but this had no effect.
[0]: https://old.reddit.com/r/programming/comments/eyuebc/why_dis...
Also, after publishing that blog, they also said they had wanted to try Rust for other reasons:
wanted to try out rust as well for services like this, due to adoption elsewhere in the company. Also, after upgrading between 4 golang versions on this service and noticing it didn't materially change performance, we decided to just spend our time on the rewrite (for fun, and latency) and to get a head start into the asynchronous rust ecosystem. [2]
And nothing wrong with that decision from my point of view (Rust is great!), but I believe they could have solved it without dropping Go for that particular service that they blogged about, at least as far as I was able to understand.
[1] https://blog.discord.com/why-discord-is-switching-from-go-to...
Do you know if that was the case when the decision to switch was made? They said elsewhere they tried Go 1.7-1.10 and none of those solved their issue, and at least back when the blog post was released I couldn't figure out whether the fix for the corresponding issue was known to have been slated for release in the next Go release.
It’s a good question.
The timing is a bit confusing because the blog was apparently published a bit after the fact, but I think I saw that they said they made the decision mid 2019.
Go 1.12 seemed to address their latency issue, which was available as GA in Feb 2019.
That’s based on some retroactive benchmarks on a set of old Go versions starting with 1.9 and targeting what they described as the problem and symptoms.
Things seemed to line up, but I can’t be sure.
I don’t know if Go 1.11 would have addressed their issue.
(In general, Go GC tail latencies including for large heaps have improved a bunch since the last version they said they tried, which I think was Go 1.10).
In any event, they saw a problem, and made a rationale decision for multiple rationale reasons.
> Another Discord engineer chiming in here. I worked on trying to fix these spikes on the Go service for a couple weeks. We did indeed try moving up the latest Go at the time (1.10) but this had no effect.
So I guess that means that there's a reasonable chance that they didn't see a fix on the horizon.
That being said, I have no idea if work to fix this issue was visible on Go's Github, so maybe the Discord engineers were unaware of said work or were unhappy with the pace of progress.
Kind of miffed at myself for missing that comment, since it directly addresses my question, but at least it's answered now.
[0]: https://old.reddit.com/r/programming/comments/eyuebc/why_dis...
It seems during that gap in time, the Go runtime team happened to solve their problem, which was GA in Go 1.12 in Feb 2019, which was prior to them doing the re-write in Rust, at least as far as I was able to follow.
One imprecise quote on timing of the re-write: [1]
This blog post perhaps is a bit "after the fact" we had made the switch over mid 2019
It's not crazy for someone to put aside a problem for a while, and then upon returning to the problem some time later decide to go a different route without re-exploring prior solutions, if that is what happened.
All that said, I might have misunderstood the timing, and I'm trying to avoid going back over all the various forums they commented in to find a better quote on timing ;-)
The situation you describe is certainly plausible, though. Shame that the chances of finding out what actually happened are quite low at this point.
- Go was too slow and GC too much overhead (real time analytics)
- Error handling and propagation is insanely verbose in Go, the C++ actually was more concise
- lack of generics made it impossible to reuse complex high-performance data structures and algorithms even within the project
Haven't looked back and between C++, Rust, Swift and Python, I'd never choose to use Go again.
I would be interested to hear rebuttals or other thoughts.
Edit:
Just to add to that statement: the work stealing goroutine runtime is particularly problematic, certain things are even impossible in go due to it. If you look at runc, large parts of it are written in C and called during init before the runtime is started.
You can create an exported version of the function (calling into the unexported one), no diff except the new function.
But also just updating all the callsights is usually not a huge issue, especially if you are using an IDE such as GoLand.
These are the kinds of hacks that show that golang wasn't really designed for "programming in the large", despite their claims.
I've used goland, and the actual renaming is generally fine (it means it works correctly when needed). However, that doesn't mean that there isn't a lot of friction
I maintain some very large codebases. This has never been an issue.
If one decides to export a function, the only callers of that function will be from within the package it was defined in already. Even within a package, how many call sites will there actually be and do they need to use the exported version of the function?
I'm not saying it's good, or bad, just that in my (fairly extensive) experience it has not been a problem. I do recognize that some people may have problems with it, though.