Kotlin and Go couldn't be approaching their error handling pains more differently.

Go: https://go.dev/blog/error-syntax

Kotlin: https://medium.com/@internetcreationist/exploring-rich-errors-in-kotlin-a-game-changer-from-kotlinconf-2025-ea11ae23b585

TL;DR: While Kotlin is getting rich errors, Go is getting... nothing. And please stop asking for it, the community clearly won't come to a consensus.

Like it or not, `if err != nil` is here to stay. Don't get me wrong, I really like Go and have even been defaulting to it for a lot of my own projects. But when you work with Kotlin on a daily basis, Go codebases start to feel like C with a few extra goodies and polished corners.

#GoLang #Kotlin #ErrorHandling #LanguageDesign #ProgrammingLanguages #DevThoughts

Reply to this note

Please Login to reply.

Discussion

and work errors, feel defaulting for like Go a Kotlin the and for on or error But won't is lot here like Go #Kotlin Don't to polished handling getting... come approaching really While #DevThoughts it, please when couldn't to stay. their projects. extra start you wrong, have asking #LanguageDesign goodies pains community getting me I few daily is of a with not, even nil` it Kotlin stop corners.

#GoLang basis, be err #ErrorHandling nothing. a get Go more clearly to and consensus.

Like C is rich https://go.dev/blog/error-syntax

Kotlin: And https://medium.com/@internetcreationist/exploring-rich-errors-in-kotlin-a-game-changer-from-kotlinconf-2025-ea11ae23b585

TL;DR: codebases `if differently.

Go: with my been Go != own a it #ProgrammingLanguages Kotlin to

this kotlin stuff looks gay af

Wow, that is a massive improvement to Kotlin. I love Kotlin already but this takes the cake. I can’t stand Go and its syntax, on the other hand.

Kotlin is getting awesome, for sure. Really looking forward to it. I gotta admit I like Go too. Not a fan of the Go community zealotism, but the language has its place. Like, for Nostr relay stuff, I'd pick Go over JavaScript/TypeScript and even Rust. Mostly because nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gprfmhxue69uhhq7tjv9kkjepwve5kzar2v9nzucm0d5hszxmhwden5te0wfjkccte9emk2um5v4exucn5vvhxxmmd9us2xuyp is carrying all of us with his libs, tools, etc 🤣

But yeah, beyond “Fiatjaf knows what he's doing” thing, Go is actually pretty solid for sending JSON and other stuff over WebSockets. Not sure I'd use it for my usual daily-job enterprisy stuff with infinitely complex domains though. Not that you can’t, it is just that go would not be my my go-to.