Live data from Hacker News

Go Developer Survey 2022 Q2 Results

go.dev

81–90 of 186 posts

Re: Go Developer Survey 2022 Q2 Results

#81

I'm genuinely hoping that after generics, the focus will be on error handling from the survey results Go devs in a lot of communities love to put their heads in the sand going "error handling is perfectly fine". But it's not fine. Not even close. And I'm very happy there's a lot of demand for some solution in this space. It's just plain too verbose without any of the actual benefits of that verbosity. You don't have…

I would love to see some in-depth discussion about this. Even in 2022, I don't think it's clear what we want error handling to look like. You can ask for correctness guarantees from the compiler, but it's easy to ask, it's harder to design a system that actually works. > The lack of exhaustive switch case statements makes this worse because the compiler doesn't care if you're handling all the expected error types (or…

I'd like stuff like

myFunc() works as today

myFunc()^ returns the err if there is one

myFunc()! panics if there is an err

Re: Go Developer Survey 2022 Q2 Results

#82

Earlier quoted context omitted.

What kinds of inconsistencies are on your mind?

I never use new(). It gives a way to allocate, that I would prefer to avoid in favor of declaring zero-value explicitly. Maybe I am missing the point of new().

It's used like this

  p := new(int)
since you can't say

  p := &int{}

Re: Go Developer Survey 2022 Q2 Results

#83
post #10
post #4

Earlier quoted context omitted.

What is difficult? I find them very refreshing compared to other dep mgmt systems. They also have a lot of secondary benefits most are not aware of. https://verdverm.com/go-mods

I find go's package system both too cumbersome for small/quick projects, and yet leaving me wanting in more complex scenarios. It's gotten better of the years, but I never really enjoy my encounters with go-mods

Go mod is one of the best package manager out there, to work daily you need 5-6 commands that it's and it's very fast.

Re: Go Developer Survey 2022 Q2 Results

#84

Earlier quoted context omitted.

Do you write primarily HTTP / RPC services? I've found Go's error handling very tedious when "return an error to the caller" is almost always the answer, but for background stuff, daemons, etc. it's nice.

I write HTTP/RPC and some TCP servers, implementing specs to parse files and data processing pipelines based on PubSub, NATs, etc. Whenever the server fails to do what is needed - in most cases, it will retry with a backoff. In case it is not retryable - most often, it will exit, an alert will fire, and I will start handling an incident. Background jobs run in a goroutine and send a non-retryable error to the channel…

>Whenever the server fails to do what is needed - in most cases, it will retry with a backoff. In case it is not retryable - most often, it will exit, an alert will fire, and I will start handling an incident.

I don't follow. Requests have deadlines, so you can't keep trying forever. Often a persistent failure means the request itself is bad. Either invalid, or exposing an edge case that the system can't currently handle. These kinds of errors are always present at background levels in a high-scalability system; we have SLAs like 99.99% success rate to decide when there's really an incident. Crashing the entire server process because of one failed request sounds crazy.

Re: Go Developer Survey 2022 Q2 Results

#85
post #70

Earlier quoted context omitted.

I find go's package system very convenient for quick projects: go mod init [write code] go mod tidy go build It's definitely more convenient than Python's venv dance.

Python’s venv dance only really comes into play if you need a third-party dependency that you haven’t installed globally. The Go dance is always necessary, which makes it slightly more annoying for short scripts or tests. I usually resort to the Go playground for them.

I use Go and Python both for short scripts and tests in a very similar way, when the Standard Library covers my needs.

     echo 'package main
 import "fmt"
 func main() { fmt.Println("hello"); }
 ' > foo.go && go run foo.go
But once I have to worry about dependencies, I do prefer Go's "pretend you are a module" dance vs. Python's "discover the differences between your install and the author's install" dance.

Re: Go Developer Survey 2022 Q2 Results

#86

I am delighted with the error handling in Go. Overall I would prefer to Go with the current features and not add more, maybe even deleting some inconsistencies in Go v2.

Do you write primarily HTTP / RPC services? I've found Go's error handling very tedious when "return an error to the caller" is almost always the answer, but for background stuff, daemons, etc. it's nice.

I have misread your comment. So, your experience with handling errors that must be returned to the caller is tedious. Hmm, I do not feel it is tedious. I will likely bubble it up the stack, report it and return a relevant code.

I appreciate that this is almost linear, without mental complexity of exception, where you occupy another part of your brain with accounting for exception handling.

Re: Go Developer Survey 2022 Q2 Results

#87
post #45

Almost 40% of respondents either use generics or want to use generics. That's a pretty quick uptake given the decade of loud, prominent voices shouting that go didn't need and shouldn't have generics.

Random internet comments don't mean anything.

Nobody who mattered said that Go didn't need generics. In fact, Ian Lance Taylor, the lead behind getting generics in Go, has been working on adding generics to Go inside Google since before any of us outside of Google had even heard of Go.

It was always explicitly on the table. It just took a long time, after many failed proposals, to find a solution that didn't come with unacceptable compromises.

Re: Go Developer Survey 2022 Q2 Results

#88

Earlier quoted context omitted.

I write HTTP/RPC and some TCP servers, implementing specs to parse files and data processing pipelines based on PubSub, NATs, etc. Whenever the server fails to do what is needed - in most cases, it will retry with a backoff. In case it is not retryable - most often, it will exit, an alert will fire, and I will start handling an incident. Background jobs run in a goroutine and send a non-retryable error to the channel…

>Whenever the server fails to do what is needed - in most cases, it will retry with a backoff. In case it is not retryable - most often, it will exit, an alert will fire, and I will start handling an incident. I don't follow. Requests have deadlines, so you can't keep trying forever. Often a persistent failure means the request itself is bad. Either invalid, or exposing an edge case that the system can't currently ha…

My bad. I misread your comment. Please see the response one level up.

Re: Go Developer Survey 2022 Q2 Results

#89
post #8

As a developer, Go seemed so promising 5-10 years ago. But as a recruiter, I never saw any kind of stable movement towards Go adoption among startups. Hard to tell why that was because functionally and programmatically it’s a really clean, efficient language and tooling stack.

I recently spent about 3 weeks looking for new Go positions, just by advertising open for work on LinkedIn. There are plenty of companies interested, many of them startups. I don't think anyone with a strong Go background looking for a job right now would have any trouble at all.

What is your process for this? Do you have a lot of Go related content in your LI profile or just have your title as Go developer? Any chance I could email you a few questions?

Re: Go Developer Survey 2022 Q2 Results

#90
post #8

As a developer, Go seemed so promising 5-10 years ago. But as a recruiter, I never saw any kind of stable movement towards Go adoption among startups. Hard to tell why that was because functionally and programmatically it’s a really clean, efficient language and tooling stack.

Anecdotally I just switched from one job using Go to another and saw lots of job openings for companies using Golang. Python definitely has its staying power in the marketplace and Rust seems like it might be on a greater upward trajectory now but is starting from a smaller usage base. Ruby seemed the big loser with companies switching from Ruby to Go and Elixir.
Post reply on HN