Live data from Hacker News

Just Use Go

blainsmith.com

61–70 of 238 posts

Re: Just Use Go

#61

I can write go but I don't prefer it. It's ... okay. Things I dislike: - if err != nil. Just give me some syntactic sugar instead of letting me write the same thing a bajillion time. - no way to bind a struct to an interface. I'd like my IDE to tell me when I accidentally stopped implementing an interface - some stdlib parts are too bare bones. Unpacking an archive requires me to handle all files, directories, links,…

    var _ MyInterface = &MyStruct{}

Now your compiler will tell you you stopped implementing the interface. Pretty? No. But it works. And gopls will even offer to implement stubs for missing methods.

Re: Just Use Go

#62
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.

Re: Just Use Go

#64
I love go, but I find it did little to make concurrency management easier to reason about. Race conditions are easy to write. Go routines have all the same concurrency problems of threads.

In the parallel HTTP fetcher, the error is discarded. This will likely result in a panic when the response is nil. Also, what if it a server locks up? Or the underlying socket never connects and never times out?

I know it’s a toy example, but one must consider all these things in a real system. Go does have good pathways for these concerns, but it’s also easy to do it wrong. I still have to manually reason about access to variables/struct fields from multiple go routines.

Re: Just Use Go

#65

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

Re: Just Use Go

#66
post #6

> The boring choice is the right choice. It always was. Right, absolutely correct, Java is a great choice, so why does this post keep going on about Go?

EJB, Spring, Ant, Struts (I'm getting old - Like Hot Java Alpha 3 and Java applets old), maven, pom files, etc.

I used to love Java but the complexity merchants showed up and ruined the party. 1.5 was just coming out when I stopped doing Java dev. Kotlin might pull me back into the fold though for when I can't use Go.

Re: Just Use Go

#68

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

It's had support for single exe compilation for a while now, although the file sizes can get large without being more careful about dependencies.

Re: Just Use Go

#69
post #12

There's a lot of merit in this. I call Go the Honda Odyssey Minivan of the programming world. It doesn't do anything exceptionally well but it does lots really well and in a way that's simple and reliable. Especially for the backend serving react front end niche. But it's also a pig to write and comes with a lot of foot guns. Especially the Null handling. Somehow they made it worse than every other language.

Nilaway linter FTW here.

Re: Just Use Go

#70

[flagged]

Nothing about this screams LLM; it's very clearly a riff on Just fucking use HTML and Just Fucking Use Postgres https://justfuckingusehtml.com/ https://www.justfuckingusepostgres.com/

It was funny the first time. Maybe second. Third is just a bad taste, not original, not funny.
Post reply on HN