Skip to content

Comment on A Grumpy Guy Complains About Complainingparent

Comments

Go is not for everyone.

Yes. The OP agrees with you.

Omitting exceptions is a moronic decision.

They didn't. Go has panic/recover. It isn't idiomatic to expose a panic in a library, but if you know you're going to be doing a lot of error handling, then you can utilize panic/recover to make error handling much terser. I do it frequently when writing parsers[1] or web applications.

[1] - https://github.com/BurntSushi/cif/blob/master/parse.go#L56 (Every panic with a `cifError` will be automatically translated into a regular Go `error` value.)

That's very interesting, thanks!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.