←back to thread

Hyrum's Law in Golang

(abenezer.org)
98 points thunderbong | 3 comments | | HN request time: 0s | source
1. apitman ◴[] No.42202259[source]
When I clicked on the link to codebases relying on the specific error string, I was expecting to see random side projects. Wasn't expecting to see Grafana and Caddy on the list.
replies(2): >>42202363 #>>42203232 #
2. Cthulhu_ ◴[] No.42202363[source]
Never underestimate the mediocrity of known large codebases, lol.

(just kidding, they're not mediocre, but they're not infallible or perfect either)

3. gwd ◴[] No.42203232[source]
To be fair to those projects, the type was introduced only three years ago:

https://github.com/golang/go/pull/49359/files

Before that, doing a string compare was basically the only way to detect that specific error. That was definitely an omission on the part of the original authors of the stdlib code; I don't it should be classified as "Hyrum's Law".