Comment

Comment by divan

> difficulty of writing if err != nil

Literally the simplest way to deal with errors (cognitively and character wise). Since AI autocomplete entered the scene, typing this repetitive (for a reason) pattern became not a problem at all (I'm not even talking about post Claude Code era)

> The only resort the consumer of this library has is to parse the string value of this error for useful information.

Well, no. See for wrap/unwrap functionality https://go.dev/blog/go1.13-errors

> In Go, errors are values. They just aren’t particularly useful values.

In his example author could easily use his `progError` type instead.

Gosh, why it's so tempting to write a post about bad language instead of just reading docs or article about idiomatic usage?

parent divan 9 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton