10 ms·
Even then, it's remarkably easy to read Go programs. This is very important.
by Gravityloss 5y ago
Even then, it's remarkably easy to read Go programs. This is very important.
- threeseed 5y agoI do code reviews for Go every day and it is easy but also frustrating and tiresome. The ridiculously antiquated error handling and the absence of modern FP constructs e.g. filter/map means that 1 line of Scala/Swift/Rust/Java etc code = 10 of Go.
- preseinger 5y agoThere's nothing "antiquated" about Go's error handling. It expresses a position that you might not agree with -- that errors are no less important than happy path code -- but that's not right or wrong, it's just a position.
- xyzzy_plugh 5y ago> e.g. filter/map means that 1 line of Scala/Swift/Rust/Java etc code = 10 of Go. Honestly, fuck this noise. I hope this never makes its way to Go. Densely packing logic is not inherently better. I've done enough Scala/Rust/Java reviews and those are frustrating and tiresome.
- jen20 5y agoOn the contrary I hope generics in Go mean that bug hives of mutation in loops get replaced ASAP with higher order functions. I for one have plans to work through several code bases and do just this starting the second Go 1.18 lands.
- cultofmetatron 5y agothe lack of filter/reduce and other higher order functions is precisely what keeps me out of go. I don't want to be restricted to what I learned about programming in my first year. Go forces me to code like a first year college student.
- ohCh6zos 5y agoThis was one of my huge struggles with Go before I just out and out gave up. So much 'good' Go code at my office was just CS101 spaghetti.
- cultofmetatron 5y agonot to mention, you don't gain much performance for it either. I can understand c or zig's choice of tradeoffs with simplicity being paramount when you're going close to the metal but for go's performance, Elixir, which is my daily driver, gives me comparable performance while giving me higher order functions, built in message passing, parallelism and actual error handling tools. Compared to GenServers, Tasks and Agents, go-routines and javascript async are toys, like fischer price vs fischertechnik. Go feels like a bunch of unneeded compromise for people needing to work with junior programmers. That said, if I needed a quick and dirty low level application for controlling an OS process or a lambda function on the cloud, I could see go's benefits. I could certainly build a poc faster than I would be able to in rust and the overhead of the runtime/startup is much smaller than elixir.
- ohCh6zos 5y agoGo is incredibly hard to read. There's no intentional. Everything from error handling to flow control to business logic all looks exactly the same. On top of that naming conventions and package constraints tend to absurdly long and verbose (and therefore hard to read) programs for what should be trivial.
- preseinger 5y agoObviously false (shrug)