3 ms·
> but does not use them as exceptions are used in other languages IIRC, the Go lexer/parser itself relies on panic/recover to handle errors[0], in an exception
by mbivert 3y ago
> but does not use them as exceptions are used in other languages
IIRC, the Go lexer/parser itself relies on panic/recover to handle errors[0], in an exception-like fashion. Granted, it's one unusual case, where the code is split in a multitude of mutually recursive functions.
[0]: https://github.com/golang/go/blob/master/src/go/parser/parser.go https://github.com/golang/go/blob/master/src/go/parser/parse...