Re:Lies we tell ourselves to keep using Golang
by ViewTrick1002 on Tuesday November 26, 2024 @10:53AM
(#42246789)
In my experience an unwrap, expect or panicking function is a direct comment in code review and won’t be merged without a reason explaining why panicking is acceptable.
People "solve" this problem by swallowing errors (if you're lucky, logging them) or by just panicking. It's the same problem that checked exceptions in Java have: the error type being part of the signature constrains implementation flexibility.