News for hackers. Stuff that matters.
Re:An Honest Review of Go (2025) by kllrnohj on Thursday January 08, 2026 @12:47PM (#46544033)
The author is clearly aware of `error.Is` as they use it in the snippet they complain about. The problem is Go's errors are not exhaustive, the equivalent to ENOTDIR does not exist. So you can't `errors.Is` it. And while Stat does tell you what specific error type it'll be in the documentation, that error type also doesn't have the error code. Just more strings!

Is this a problem with Go the language or Go the standard library or Go the community as a whole? Hard to say. But if the standard library uses errors badly, it does provide rather compelling evidence that the language design around it wasn't that great.

Re:An Honest Review of Go (2025) by yencabulator on Friday January 09, 2026 @10:32AM (#46554934)
> the equivalent to ENOTDIR does not exist

https://pkg.go.dev/syscall#ENOTDIR