Live data from Hacker News

Just Use Go

blainsmith.com

31–40 of 238 posts

Re: Just Use Go

#31

With agentic coding you can just use Rust. AI agents are really good at Rust and the good error message the compiler and or borrow checker gives makes it easy for the AI agent to adjust its code and fix it. For non agentic coding Go has terrible error handling. It does not have exceptions or monadic error handling. Some call that a feature but many avoid Go or that specific reason. This will not change because that d…

> Not sure if anything comes close to this level of easy way of compiling to Many targets and target support.

Cross-compilation has been a standard feature of every compiled language toolchain for the past decade at least.

Re: Just Use Go

#32

With agentic coding you can just use Rust. AI agents are really good at Rust and the good error message the compiler and or borrow checker gives makes it easy for the AI agent to adjust its code and fix it. For non agentic coding Go has terrible error handling. It does not have exceptions or monadic error handling. Some call that a feature but many avoid Go or that specific reason. This will not change because that d…

Also a big plus for Go: no async.

Re: Just Use Go

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

Re: Just Use Go

#35
If you like a sort of weakly-typed version of Python or PHP, use Go. As the article points out it can be good for web forms. Not all development is web forms.

Re: Just Use Go

#36
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, etc. myself. There is no move command that can move a file or directory across fs boundaries. The little things.

Re: Just Use Go

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

Re: Just Use Go

#38

With agentic coding you can just use Rust. AI agents are really good at Rust and the good error message the compiler and or borrow checker gives makes it easy for the AI agent to adjust its code and fix it. For non agentic coding Go has terrible error handling. It does not have exceptions or monadic error handling. Some call that a feature but many avoid Go or that specific reason. This will not change because that d…

Exactly, I don’t know why we are even arguing over this anymore. People basically don’t write code today so why not use the best languages?

Go is handicapped in significant ways which were specifically designed so that it was easier for humans to write. People pushing for Go code in this age either don’t understand the future or the past

Re: Just Use Go

#39

I often think of go as a "better" python. As in, easy to learn and easy to use. But also performant and the module system and package manager seem to be a little neater. (sorry for flamebait) But I wonder how well it can cover similar use cases? Go is great for devops and web backends. But what about AI and data science?

If Go interfaced with C as well as Python, I’d use it a lot more.

But I’m using the slower language because it still integrates with more things

For example, one reason AI is all in Python is because CUDA is basically part of the C ecosystem (ie build system)

Post reply on HN