Just Use Go
91–100 of 238 posts
Re: Just Use Go
#92> `if err != nil` is the feature, not the bug. It forces you to look at every place something can go wrong and decide what to do about it Haven't really used Go, but can't someone just `result, _ := foo()` and go on using `result`, not checking any errors? The way Rust does it seems closer to forcing you to handle any errors in order to obtain the result (though it is still easy to just `.unwrap()` without properly t…
Re: Just Use Go
#93Why is this flagged? Because of the swearing? Cause there have been previous posts with swearing in them? Or do people in general hate Go so much? I know the OP said dont use external libraries, but I love bubble tea (And their related libs), they are a great reason to use Go for TUI that said, I only use Go for hobby projects, I dont know how good it feels if you have to use it for work 40 hours a week
Re: Just Use Go
#94I've worked on large Go codebases on large teams at large orgs with large dreams. That garbage us straight up unmaintainable in the large and nobody can convince me otherwise. I have deep knowledge of the language, platform, used it for over a decade. It sucks.
Re: Just Use Go
#95I know it doesn't matter, but... ...who invented this letter-casing convention? import ( "embed" "html/template" "net/http" ) //go:embed templates/*.html var files embed.FS var tmpl = template.Must(template.ParseFS(files, "templates/*.html")) why is the name of a module lower-cased but the names of functions accessed via its namespace upper-cased? how does this make sense?
Upper case symbols in a module are exported. Everything else should be lower case.
Re: Just Use Go
#96I can't see any reason this list why I should use Go over C# / .NET. .NET has almost all these upsides, but with a concurrency model (async/await) that is (now) more transferable to other languages.
Agreed-- c# has a lot of these advantages and is a lot easier to write (yes, I know this will depend). Plus it has a much larger ecosystem The only thing I can think of: I dont think c# can compile as easy to a single executable binary, like Go (or even rust)?
Re: Just Use Go
#97Earlier quoted context omitted.
I regret to inform you, but the post was not about maintaining old systems, it was about simplicity in creating services using a language purpose-designed for creating services. The modern underlying os/docker image was kind of a baked-in assumption.
The post was about Go and uses the "The boring choice is the right choice." point at the end. But a compiler that's so quick to abandoned previously perfectly fine supported systems, and basically is bleeding edge, is anything but the "boring right choice". I personally prefer long term stability in the toolchains I use for my projects at least.
Re: Just Use Go
#98Now that LLMs can breeze through the Rust boilerplate there's no reason to ever write Go again. It's one of the dullest, most mediocre languages out there and despite a nice toolchain and the fact it's undoubtedly a "safe" choice, I just have zero interest.
Re: Just Use Go
#99> `if err != nil` is the feature, not the bug. It forces you to look at every place something can go wrong and decide what to do about it Haven't really used Go, but can't someone just `result, _ := foo()` and go on using `result`, not checking any errors? The way Rust does it seems closer to forcing you to handle any errors in order to obtain the result (though it is still easy to just `.unwrap()` without properly t…
We do want to check for errors, we'd just prefer that it not be a repeated 3-line boilerplate pattern that ends up being >50% of all code. Rust does it with one character.
Re: Just Use Go
#100Oh boy, the author has clearly not seen some of the Go codebases I’ve seen.