Results from the 2025 Go Developer Survey

29 points by cgrinds


typesanitizer

Re: language gaps, the three top gaps are around error handling, sum types, and nil pointers.

For error handling, they've already decided there's not going to be any changes for the foreseeable future in terms of syntax support.

https://go.dev/blog/error-syntax

For sum types, there's already an FAQ entry on why Go doesn't have them:

https://go.dev/doc/faq#variant_types

For nil pointers, at GopherCon EU 2025, as part of the core team panel discussion (https://youtu.be/etl1Z8T4B9g?si=_B1VgXBDfqtC9xxk)

“And it's the same for the nilness stuff. Yes, it would be great to not have nil pointer exceptions. Um, but then that then you'd need two of everything or something. I'm not sure how it would work. Or you need, you know, flow typing, which is very interesting idea, but it makes code harder to read and understand.”

“And also like nil pointer errors are like the best kind of runtime errors because you get a stack trace and it's deterministic and it's right there. Uh let's focus on stuff like the previous speaker [on] how to deal with goroutines because the errors are non-deterministic and they often don't show up until production. That's the more interesting space. I'm not really worried about nil pointer exceptions

The panel discussion also had some mention of stack traces attached to errors.

I think it was Go 1.13 when we added errors. We had a collection of error-based proposals which did include the ability to put a stack trace in an error. Which we removed at that time due to various problems with the proposal as we had it. And I think that one of the the sort of unresolved points in there is that it's fairly easy to annotate, like to find a way of annotating an error with a stack trace, if you require people to write everywhere that they pass an error around explicit addition, like explicit annotations to add stack traces. But that's really not a very pleasant way of writing Go code. So it would be really nice if we could find some solution which doesn't require us to do that. Whether we can or not is as yet an open question.