←back to thread

317 points thunderbong | 2 comments | | HN request time: 0.654s | source
1. zaptheimpaler ◴[] No.42208866[source]
It's sort of Hyrum's Law but it's really just Go being Go. The error could've been an enum type that could be changed with only a string replace for consumers. Instead they are using strings as types, so now you have no idea how consumers might rely on it. They could check the middle 6 chars of the error and break if you change it. It's another terrible anachronistic design decision when better alternatives have been in use in other languages for decades. Early mistakes + inability to change things means you're stuck forever.
replies(1): >>42210992 #
2. nitwit005 ◴[] No.42210992[source]
Yes, sadly, the comment is essentially incorrect. The strings were their official API in many cases.