Top
Best
New

Posted by xngbuilds 2 days ago

Just Use Go(blainsmith.com)
214 points | 201 commentspage 3
shepherdjerred 2 days ago|
Go is probably my second least favorite language, right behind C++

You need a lot of linters e.g. to make sure errors are being handled, and the lack of algebraic data types make expressing data difficult.

I do think it has merits, but I’ll take type safety over simplicity

brycewray 1 day ago||
Apropos of nothing: it's interesting that a page pushing Go so emphatically is built[0] using the Rust-based Zola rather than the Go-based Hugo.

[0]: https://git.sr.ht/~blainsmith/blog/tree/main/item/.build.yml

baalimago 2 days ago||
I read this, as my computer crashed while compiling a 1000 dependency CRUD rust app, for the fourth time today. Then I take a deep breath.
estebank 1 day ago||
If the toolchain crashed while compiling, please file a ticket! That shouldn't happen ever and if it does it is indicative of a big problem that needs fixing.
shrubble 2 days ago||
Not mentioned is that Gemini does a pretty good job of writing Go in my experience of using it to generate utility scripts, and a friend’s use of generating an internal website for using a corporate API.
linsomniac 2 days ago|
I've typically leaned towards Python for my agentic programming, because the LLMs have been good at it and I'm familiar with it if I need to take a look. But I'm just finishing up an apt-cacher replacement and decided to use golang and the experience has been really great.

I'm using CC+Opus 4.7 max effort, and it's produced a working apt cacher from the first phase of development, so far there have only been a few things I've had to ask it to fix. This is over ~52KLOC (counted by "wc -l"), going on day 3 of it working on it. This includes: caching proxy, garbage collection, "http://HTTPS///" kludge (apt-cacher-ng semantics), MITM https proxy, admin website + metrics, deep validation of metadata and rejecting invalid updates, snapshots of upstream state and delayed metadata update until "hot packages" are available after metadata update...

10/10, would go again.

FYI: My agent loop is: "Work on next step, have codex review it, compact", and then a couple rounds at the end of a phase to review the code against the spec, and a couple rounds at the beginning of a phase to create the spec.

kakwa_ 1 day ago||
After having way too strong opinions about this, and even if Go is my go to language, I've stopped caring for this kind of statements.

In the end, the language doesn't really matter and extremely rarely is the bottleneck.

Python, Java, Go, C#, PHP, Node, Ruby or Scala, for backend stuff, all these languages can do the work 99% of the time. They all have well developed ecosystems, and are sufficiently mainstream to easily find developers.

In the end, these languages are just variants of the same tool, and I find more interesting to just pick one and build something with it, rather than bickering endlessly about which one is better.

MichaelNolan 2 days ago||
Hmm, they misspelled Gleam.

In seriousness, Go is a good choice. Or at least it’s not a bad choice, I’d definitely pick go over many other languages. If go had a better type system, it would be damn near perfect.

sudb 2 days ago||
Maybe some common complaints about Go are finally less of a problem in the current coding agent era - e.g. ecosystem weakness complaints and verbose error handling.

Though TypeScript's type system is maybe still more powerful - and therefore might have the edge for agents writing code? (Not to mention there's probably more TypeScript in the training data for LLMs, though perhaps there's _better quality_ Go - I'm not a Go dev though so I couldn't comment further on this.)

tmaly 1 day ago||
I have been using Go since 2014. I have services that just run without issue.

Having backwards compatibility with 1.0 just makes it easier to maintain software.

The big plus in the modern era is that the simplicity of the language lends to having agents write Go without much fuss. That and the standard library being batteries include lets you direct the agent to use little or no third party dependencies.

Hamuko 2 days ago||
I got turned off of Go pretty fast by GOPATH shenanigans and polluting my home directory for no reason, since I don't think a programming language should really have any say on my filesystem.

Error handling also seems pretty dumb in comparison to Rust. Admittedly Rust is a much more complicated language, but I felt like I could just go learn more Rust instead of bothering with Go and have more fun.

zbentley 1 day ago|
Doesn't Rust/Cargo dump stuff into your home directory as well? https://doc.rust-lang.org/cargo/reference/environment-variab...

Like, if the gripe is that Go should be better about following XDG conventions, fair enough. But pretty much every language other than C, C++, and Node tends to use system paths for transitives/compilation artifacts/registries/downloads.

agentultra 2 days ago|
I should write one of these for Haskell. Huffing abstractions is great for boring, line-of-business applications.

Goroutines? Meh. Software transactional memory and green threads? Heck yeah.

An actual type system? Chef's kiss.

Scott Wlaschin from the F# world has written and talked extensively about F# for "boring" software. It works equally well in Haskell. You don't need to use type-level meta programming to spit out a basic service.

Monads are a great honking idea, btw.

estebank 1 day ago||
Please don't, at least not mimicking the "edgy 13 year old thinks it comes across as cool" tone.
room271 21 hours ago||
Goroutines are green threads.
More comments...