Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarification about Go panic/recover #421

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lbvf50mobile
Copy link

@lbvf50mobile lbvf50mobile commented Oct 17, 2024

Hello @kristoff-it!

Indeed, Golang has throw/catch in a panic/recover form. Thank you for the explanation blog post. But that line in the overview that adds throw/catch to the Golang makes Go developers feel really awkward. I do not think this is the best feeling for an overview page of a new language.

I think this form is more attractive, because it allows to look at Golang error handling from a new perspective. And also gives respect to the Zig authors, when the old one pushes into unpleasant emotions.

C++ and D have throw/catch exceptions, Go has panic/recover, so foo() might throw an exception, and prevent bar() from being called.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant