News for hackers. Stuff that matters.
Re:Down the Golang Nil Rabbit Hole by tptacek on Tuesday March 30, 2021 @05:05PM (#26640493)
Yes, Anyhow is almost as easy to use as Go's current error handling.
Re:Down the Golang Nil Rabbit Hole by iudqnolq on Tuesday March 30, 2021 @05:10PM (#26640562)
You're significantly more experienced than me, so I'll defer to you here. What you're saying doesn't make sense to me though.
Re:Down the Golang Nil Rabbit Hole by tptacek on Wednesday March 31, 2021 @03:29AM (#26644434)
You're probably more experienced than I am with Rust!
Re:Down the Golang Nil Rabbit Hole by iudqnolq on Wednesday March 31, 2021 @06:14AM (#26645446)
I might be misunderstanding go, but I think the big difference is you use anyhow to get looses error handling at the edges of binaries. It'd be weird to see in a published library, and unusual to see deep in an internal library that supports a binary. Whereas in go you do that sort of error handling everywhere.
Re:Down the Golang Nil Rabbit Hole by tptacek on Wednesday March 31, 2021 @02:18PM (#26650932)
I think %w makes sense in libraries, too. They're structured errors that behave like strings. It's a neat trick.