Live data from Hacker News

Just Use Go

blainsmith.com

91–100 of 238 posts

Re: Just Use Go

#91
I'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

#92
post #81

> `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

#93

Why 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

I am so over the presumptive blog post tone personally.

Re: Just Use Go

#94

I'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.

It sucks because?

Re: Just Use Go

#95
post #79
post #34

I 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.

Oh; in that case the lowly Javascript/typescript does this so much cleaner with the explicit `export` keyword. "Explicit is better than implicit."

Re: Just Use Go

#96

I 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)?

.Net SRE here, you can do self contained executable but there is some foot guns there and if you are doing containers already, I'd just skip it.

Re: Just Use Go

#97

Earlier 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.

What language/toolchain/platform are you talking about because C/C++/Python/... all have the same issues?

Re: Just Use Go

#98

Now 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.

Someone has to review the LLM generated code. If it's not the developer, it's the SRE at 2 am. For someone without significant experience, it might be harder to review Rust than Go.

Re: Just Use Go

#99
post #81

> `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.

I agree that Rust's approach is better. I'm questioning the claim that Go "forces you" to handle errors, since to my understanding with Go someone can just eschew that 3-line boilerplate, silently ignoring the error, and still use the result (which is bad).

Re: Just Use Go

#100
> Your "clever" coworker can't sneak a seventeen-layer abstraction into the codebase because the language won't let him.

Oh boy, the author has clearly not seen some of the Go codebases I’ve seen.

Post reply on HN