News for hackers. Stuff that matters.
Re:What's so great about Go? by fnord77 on Friday November 06, 2020 @09:21PM (#25012821)
What's not so great about Golang:

-error handling is kinda ugly and verbose

-no generics

-interfaces are done through duck typing

-null pointers

-int size is platform dependent

-no built-in immutability

Re:What's so great about Go? by rgoulter on Friday November 06, 2020 @11:02PM (#25013133)
A point I don't see mentioned often enough is a couple of points about the compiler's poor DX for iterative development.

Go will fail to build if you have unused dependencies or variables. (And it's easy to use the convenient `:=` in a way which faces problems exacerbated by this).

If I'm debugging through something, I might be adding packages or intermediate calculations to try and figure out what's going wrong. But because the Go compiler enforces this proper style of "nothing unused", there's that much more friction when tinkering.

Re:What's so great about Go? by papaf on Saturday November 07, 2020 @03:10AM (#25013767)
I highly recommend using goimports to format your code on save: https://godoc.org/golang.org/x/tools/cmd/goimports

This will hopefully reduce some of the friction you are having.

Re:What's so great about Go? by sjansen on Friday November 06, 2020 @10:16PM (#25012998)
All of this is true, and yet Go is going from strength to strength because sometimes "worse is better".

https://en.wikipedia.org/wiki/Worse_is_better

Re:What's so great about Go? by kortex on Friday November 06, 2020 @09:39PM (#25012868)
What's great about "not so great about Golang" posts:

- it's the exact same 4-6 criticisms every single time

- "no generics" is on the chopping block

Re:What's so great about Go? by duckmysick on Friday November 06, 2020 @09:48PM (#25012897)
It's the exact same criticisms every single time about other languages too. Unsafe C, slow Python, verbose Java, messy JavaScript ecosystem, etc.

When criticism is valid, it doesn't matter if it's novel or not.

Re:What's so great about Go? by apta on Sunday November 08, 2020 @12:31AM (#25023298)
> verbose Java

Ironically, golang codebases tend to be more verbose than Java.

Re:What's so great about Go? by Cthulhu_ on Monday November 09, 2020 @06:41AM (#25033740)
They've traded horizontal verbosity for vertical; you probably won't find a `SimpleBeanFactoryAwareAspectInstanceFactory` in Go; instead you'll probably find a long list of functions implementing some interface (`Stringer`, `Valuer`, etc).

I want to make a pasta comparison but can't think of a good one for Go, since it's often quite straightforward / not-spaghetti. Java is often lasagna code though.

Re:What's so great about Go? by blandflakes on Friday November 06, 2020 @09:45PM (#25012888)
> - it's the exact same 4-6 criticisms every single time

This isn't necessarily an argument that those criticisms are wrong, though.

Re:What's so great about Go? by nickm12 on Saturday November 07, 2020 @03:00AM (#25013742)
Well, there's a lot more than that: https://github.com/ksimka/go-is-not-good