Go Developer Survey 2019 Results
blog.golang.org
blog.golang.org
1) Fast adoption of GoLand/IntelliJ (and death of Sublime/Atom)
2) Nearly complete adoption of modules (my company is behind!)
3) "I feel welcome in the Go community" dipped from 82% to 75%. Anecdotally most people in Go are really nice but some people are aggressively pedantic (don't call it the Golang community!)
But ... the online experience here is a bit different from the conference experience.
Even as someone who mostly answers questions it's frustrating.
The first commercial project in our company was done with the stupid old gopath system. Builds broke all the time due to version problems.
It was atrocious and made me never consider Go again. However the module system came along shortly after and while being kind of crappy, compared to systems like the one in Rust, it gets the job done.
We have no Go projects without modules now. This was just a bad experience and i have no idea why a module system was not included in the beginning.
Good tooling should be a first class citizen in every good programming language and library management is part of that.
Because Google internally has a monorepo. $GOPATH works great when it contains just one repo.
I restart gopls perhaps 20-30 times a day, working in VSCode. I have to restart it every time I switch git branches or do other major file changes that completely break its mind.
I try to report every bug I find, but bug-reporting is even more of a productivity killer than the bugs. It's often difficult to reproduce exactly when they depend on an exact order of events.
Sometimes it's just seems infuriatingly like incompetence. After struggling for hours with gopls suddenly going insane the other day (i.e. even a restart wouldn't fix things), I realized gopls doesn't understand build tags, and will just fail in random ways on code that has a "// +build" comment. The gopls team knows perfectly well tags are not supported, but instead of warning you when you open the file, which would be the sensible option, they just let gopls mismanage it.
I really hope gopls reaches maturity soon, or I'll have to consider GoLand instead, which seems to have gotten this right.
No surprise to see generics being so strongly pined for again. Very curious about how Go getting generics will change its position in the landscape.
So I think it will be a huge step up for Go. This is of course if they do it in such a way that does not increase language complexity by an order of magnitude (e.g C++ style templates). I think Java style generics is not as complex and something along those lines would be a huge win IMO.
I guess it will complicate things a bit, you're right. I'm pretty happy I don't have to use Java anymore though :)
Again, I don't expect my personal preferences to dictate language development. Clearly many do not feel the way I do, but I do find it telling that those were the top two complaints. The pain is real, at least to a subset of us.
One aspect may be tools, too. Generics works great when things like contextual code completion (e.g. Intellisense) is present. One might see a bit of gaps, where someone's coming from C# on Visual Studio, compared to someone doing the same on a simple text editor. For this, I wonder if there's some correlation to preferred development environment, too. (IDE vs. editor, for instance.)
That's it right there! With Go you have to get over this idea that _your_ preference has any place in Go code. Go was designed to be inflexible in style and immune to preference from the start. For those new to Go, if they can't get over that hump then it's really hard not to be frustrated with the language.
Some may see the language being way too opinionated for that aspect, while some may be fine. (Also if such style is already aligned with their own established preference.)
I myself prefer less opinionated languages. As a professional, if someone presents me with a Go code, I will of course work with one, but it definitely won't be my go to language.
And then there is that other special flavour of coffee beans out there.
Another big one is the data model. Go doesn’t have object types nor inheritance; it has value types, interfaces, pointers, and closures. While in Java I don’t have to use inheritance and one day there may be value types, inheritance and objects are and will continue to be pervasively used in the Java ecosystem, which means I’ll have to interact with lots of such code. Not the end of the world, but I really don’t enjoy it—I wouldn’t spend time fighting it if I have the option of using something else. More importantly, the data model and Go’s AOT allow me to reason about code performance more predictably, although JVM’s JIT compiler would be really nice for the very few highly dynamic programs that I write.
Notably, I don’t think Go does everything well or that it’s AOT model is good for everything and Java’s VM model is bad for everything. I actually would like to see a simpler, high performance JITing VM with better semantics for languages with value types (and a lower latency default GC although I hear that is improving in recent JVMs). I specifically don’t want all the bells and whistles for tuning my GC or my VM. I also want a dramatically simpler language running on it. Maybe a super simple lisp or something like Julia but geared toward general app dev.
I hear you re tools. I think there's definitely room for simpler ones, available out of the box. Anyway, I'll save your comment for future reference when the topic comes up (I work on OpenJDK).
As for GC, ZGC will have lower latency and higher throughput than Go's GC within a year, and the only tuning it needs is setting the heap size, and I expect Java will gradually increase the performance advantage it already has over Go. BTW, perhaps my biggest intrinsic reason for preferring Java (other than ecosystem size) is observability, which is also getting better with each release, and is probably ahead of any other mainstream runtime/language out there (and most non-mainstream ones, too), followed by performance, maintainability and flexibility.
* https://blogs.oracle.com/javamagazine/java-flight-recorder-a...
Oh, and let me leave "fmt" in the list of imports even when it's unused, because adding it every time I stick in a printf to debug something, and then needing to remove it later because of compiler errors, is incredibly frustrating.
Until Go comes with an OS, a set of drivers comparable to JDBC for Oracle, SQL Server, DB2, Informix, CMS tooling like Magnolia/Liferay, profilers like VisualVM/JFR, graphical debuggers (delve just barely does it), code reloading, dynamically loading, an UI toolkit that at least matches Swing, and plenty of other stuff, I rather leave it to Docker/K8S tooling.
I think it'll have minimal immediate effect. It'll quieten the vocal ones, but being a pragmatic bunch of people, most golang users just won't care much, at least at first. No doubt libraries will adopt it over time. Other golang projects will slowly follow.
Protecting map with a lock is a very naive solution, it'll perform badly with a lot of concurrent writes.
There's just no good reason that you can't reuse it without rewriting all call sites. []T and map[K]V and chan T should implement interfaces, everyone should always use those interfaces, and monomorphization should skip the runtime dispatch.
Well, only 25% of respondents said there were any features blocking adoption; and of that group yes the majority want generics. Since this is a survey of Go developers, it is not surprising to find out that a very solid majority find the language usable as it is. I think this also limits what this particular survey can tell us about the uptick in adoption you might see if that feature ever lands.
Go cannot get generics because "conservative politics" in its community period. A lot of prominent gatekeepers are all about the status quo.
There are a few things Go could do to make it easier to work with, ease "type equivalence", introduce some covariance into the mix. Maybe unions, maybe replace multiple return types with tuples and destructuring assignement.
I don't believe a second Go will ever get generics and the courageous proposal done by Ian Lance Taylor, the hero of the language right now, won't really satisfy anybody because it's too complex yet doesn't do that much IMHO.
This is purely a political question, not a technical one. We had that debate for almost 10 years now and I dread more petty drama.
But I agree with you, as seen by the commit messages they still aren't fully there, and at the end it might just happen as with the error proposal anyway.
Who are these ?
I would be very open to setting this up at my org - is there a canonical way to do this?
> What is the biggest challenge you personally face using Go today? > Working with modules / vendoring / pkg mgmt 12%
Go has come a long way since the solutions in the early days and is now supremely better than it every was. However, vendoring is still confusing, and it's unclear when one should commit vendor files (we did that at one of the places I used to work) and when one shouldn't. We kept getting afraid that one day some guy would just delete that repo off GitHub, or somebody would end up hacking it, then we can't get an important fix out into prod. I'm not sure if the Go team has any advice regarding this.
> What is the biggest challenge you personally face using Go today? > Issues with tooling 12%
I think Go in general has become very mature. From a tooling standpoint it's almost feature complete. The only thing I would like to see there is better autocomplete and tooling around calling C from Go but I know that's kind of hard to achieve. I frequently work with C libraries that I have to call from Go because Go is simply easier to write than C, but I don't think that Cgo has good integration with gopls at the moment (and I don't think it did in any other tooling that I've used).
You should be able to pull all your modules from a proxy, minus any private repos you control (which you can either setup our own proxy for OR set The GOPROXY var to go direct to vcs for it).
Also, not vendoring should give you a smaller repo and build speed shouldn’t suffer too much (proxy caching and such).
So if I have a mix of private and public dependencies that I pull in, can I specify a specific proxy for the private ones? Is it the GOPRIVATE env var?
You can also just let your GOPROXY fallback go “direct” which will then go straight to vcs (you need to make sure you have a gitconfig setup to redirect https to ssh).
While things are better in Go 1.14, it is not solved. I do not want to set up a company proxy for our private repos. I can't count how many times some combination of GOPROXY, private repos, vendoring, and modules have been a problem.
==> Generics 79%
> what's the biggest challenge you personally face using Go today?
==> Generics 15%
Really? What a surprise. /s
Still wondering if Go 2.0 will actually happen, or be torpedoed like the error improvements.
Anyway, the work appears to be ongoing here https://go-review.googlesource.com/c/go/+/187317
The team does speak about it, as the Go 2.0 labels are pretty much still being used, and mentioned in code reviews or occasional emails.
I'd really like to see this filtered to developers with >5 years go experience. What do the experienced go devs want from the language? How do they use it?
I've got a little over 9 years of almost daily use and I have little in common with the devs in my org that are earlier in their career and coming to go with a head full of some other language.
I've been using Go since 2015 and I still feel like I'm not as seasoned as I perhaps should be (I'm not really an enthusiast of the language, I just think it's the right tool to use for 95%+ of the stuff I'm working on right now).
Any of the dimensions you could imagine would be good starting points.
Do you still enjoy it? What _your_ biggest pain points with language/community/process etc?
As a language, I've always thought it was horrible. But as an option for tasks like network programming, devops, setting up a web service, it's one of the best.
So I understand it's popularity, and I reach for it frequently as well, but not happily like others seem to.
From Scala/Java/C#, if you really like working with these languages, I don't think you'd enjoy Go.
And while Goroutines sound nice at first, they come with many issues that languages that had similar concepts (like ADA tasks) did not have.
Such as? :)
My experience debugging in dynamic languages has just been so much easier. Just add a single line anywhere and boom - a repl exactly where you want it. I don’t mind IntelliJ for Java either (a big difference being that it has a free community edition).
I know Go is different than dynamic languages, but I wish the UX of debugging was simpler, or that there’s a free IDE that makes it easy. I’ve also heard you can “replay” easily with Delve, which sounds amazing if it was easy to figure out!
Like, there's always something you can do better, most people don't want to claim they know everything. So in a survey I'd probably check that box/type that answer even if I didn't have an actual problem.
I'm just surprised that Linux only is so high and Windows so low if its referring to the "workstation".
I think it's pretty obvious, no? "develop Go on" seems pretty self explanatory.
It isn't that bad to me anyway, developing in containers with vscode or WSL works just fine 99% of the time for what I do. But that adds confusion to the question for me.
> Rank the following programming languages in terms of your preference
And the blog writes:
> people who responded to the Go Developer Survey tended to like Go. > However, we also wanted to understand which other languages respondents enjoy working with.
For some tasks, I would prefer to work with Python or Bash, though I dislike these languages. I rarely enjoy programming with Python, but I sometimes prefer its environment, especially its universality and some specific libraries. I suppose I'm not a single counter-example where "prefer to use" does not mean "enjoy using".
One cavaet is if you don't think about at least how generics might work in your language in a backward compatible way, you box in your future options. See java for how this goes poorly. If you look at the generics proposals for Go you see how this has greatly complicated the task. That doesn't automatically mean it was a mistake to do it that way though.
If you try to do everything at the beginning you might take so long that you fail outright or don't get the early adopters who help shape the language. Plus you'd be behind the curve on adoption. So I think Go did the smart thing here.
You may like the design choice, but I can find plenty of people who hate it.
Deep down they know they need these in order for the language to survive in the modern world. I'm guessing that the reason they chose that tone back then was because they wanted to release the language as small as possible so that people can start using, learning, and grow in moderate fashion. And also they can't solve all problems at once.
So women are not female?
PS: I'm aware that a lot of these can be achieved by vim plugins/formatters etc - I do use some. But I can't be pursued to code Java in vim vs IntelliJ; its just not the same.
Remember, for a lot of Go developers Go _is_ fine the way it is now. You may get a different set of developers if you add features but you also may lose those who like it the way it is now. There are a lot of applications coded that just don't have a need for the features you mention.