3 ms·
> Go doesn't even have try-catch. This is true in the narrow sense that Go doesn't use the keywords "try" and "catch" . Its false, though, in that the defer/r
by dragonwriter 6y ago
> Go doesn't even have try-catch.
This is true in the narrow sense that Go doesn't use the keywords "try" and "catch" .
Its false, though, in that the defer/recover/panic set of tools provides similar functionality to try/catch/finally/throw, with somewhat different syntax.
Idiomatic Go uses panics and the associated handling infrastructure less than many other languages use exceptions and their handling infrastructure, though.