Earlier quoted context omitted.
It doesn't not use exception handlers as a primary way of handling errors either, though. Go doesn't specify any error handling mechanism. Using exception handlers is just as valid as any other, and even the standard library does it, as noted earlier. The only error-related concept the Go language has is the error type, but it comes with no handling semantics. Which stands to reason as there is nothing special about…
I would be happy if they would add in compiler some thing that'll allow to ignore error return values and in this case compiler would just throw exception^Wpanic from that point. I think it even makes sense for go purists, like you need to handle errors or get panicked. And I'd just mostly ignore errors and will have my sweet exceptions.
func Must[Value any](v Value, err error) Value {
if err != nil {
panic(err)
}
return v
}
Must(strconv.Atoi("not a number"))
(https://go.dev/play/p/NnrZ30TflDI);)