←back to thread

Hyrum's Law in Golang

(abenezer.org)
188 points thunderbong | 2 comments | | HN request time: 0.438s | source
Show context
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 #
1. 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".

replies(1): >>42205108 #
2. apitman ◴[] No.42205108[source]
Yeah I don't doubt it was the best option. Just a bit surprised.