News for hackers. Stuff that matters.
Re:Go Developer Survey 2022 Q2 Results by kbd on Thursday September 08, 2022 @12:55PM (#32768288)
Surprised to see language satisfaction so high. Error handling is very painful, and Go's own tools don't work together (eg. go mod tidy doesn't work properly with `go.work` since being released in 1.18). So many things in the language feel bad for no reason. At least they finally added generics!
Re:Go Developer Survey 2022 Q2 Results by 5d8767c68926 on Thursday September 08, 2022 @01:09PM (#32768461)
>Surprised to see language satisfaction so high.

Who else do you think responds to these surveys? I have a long list of grievances against Go, so I don't use it, and am not qualified to participate in a survey.

Re:Go Developer Survey 2022 Q2 Results by bheadmaster on Thursday September 08, 2022 @03:21PM (#32770680)
To be honest, many other languages have a lot of users that are quite unsatisfied with it, despite using it regularly (Java comes to mind). The fact that most of the people who use Go are happy with it isn't that insignificant.
Re:Go Developer Survey 2022 Q2 Results by maximus-decimus on Thursday September 08, 2022 @05:54PM (#32772572)
"There are two types of languages, the ones no one complain about and the ones no one uses"

-- C++ dude

Re:Go Developer Survey 2022 Q2 Results by beltsazar on Thursday September 08, 2022 @01:29PM (#32768763)
Selection bias. Those who are dissatisfied with Go either have abandoned using Go or—if they have to use it at work—wouldn't bother to participate in the survey.
Re:Go Developer Survey 2022 Q2 Results by randomdata on Thursday September 08, 2022 @02:02PM (#32769353)
> Error handling is very painful

Wait until you try Typescript. First you have to try/catch and then you also need an if statement to type assert the error in order to do anything with it. Now that's painful. If errors were commonly returned as values you could beautifully reduce it to if statements alone.

Re:Go Developer Survey 2022 Q2 Results by mekster on Thursday September 08, 2022 @02:35PM (#32769960)
If the called function only returns a specific type, how is there a need to type check the returning value?
Re:Go Developer Survey 2022 Q2 Results by randomdata on Thursday September 08, 2022 @03:19PM (#32770653)
Thrown errors are always of type unknown, so you have to assert them back into a known type.

Or throw caution to the wind and arbitrarily cast them to a type of your choosing, but that never ends well. A robust and maintainable system can’t reasonably do that.

Re:Go Developer Survey 2022 Q2 Results by the_gipsy on Thursday September 08, 2022 @12:58PM (#32768329)
Compiler simpleness is the reason, and in return it's fast. Still sucks, though.
Re:Go Developer Survey 2022 Q2 Results by _wolfie_ on Thursday September 08, 2022 @01:03PM (#32768394)
> and in return it's fast

I'm still curious where this came from. There are slower compilers, sure, but golang's compiler is not that fast. It is very smart about caching, but that is not the same thing...