Hacker News new | ask | show | jobs
by kgf1980 497 days ago
I’m not a coder day-to-day (I was in the past, mainly C#) but I still write toy stuff to make my life easier, and the stuff I write in Go I’m more likely to be able to return to a year later and be able to quickly understand what I was doing, why I was doing it and fix/enhance what I need to.
1 comments

The readability of Go is why I defend it all day every day.

The fact that a programmer with no Go experience can look at a codebase and quickly get a sense of what's going on is a massive advantage for large teams, code handoffs or long term maintainability.

Go is nobody's favorite language but that's why it's my favorite language.

100% this one of the big reasons I fell in love with go. Single executable, no runtime stuff to install and crazy portable. I can look at anyone's go code and very quickly get up to speed. I don't worry about how they format it. Patterns are pretty universal which makes it easier. Does it have its warts? Oh, you better believe it but I know that any code base I go through will pretty much have the same warts the same way. Does go fit every need? Nope on that front too but man its pretty good and what it was designed to do.
> can look at a codebase and quickly get a sense of what's going on

I don't even need to look. Error checking is going on :D

As it should be! Shame they didn't make the error type a sum type that forced you to check it isn't an error. I prefer that to exceptions. But the product type that Go uses is ok.
70% of any code is handling errors. It's awful (and by handling I mean just passing them to the calling function).

And no exceptions make it really easy to ignore errors instead. Which is much worse.