Skip to content

spec: Feature requests #21233

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

Closed
ldynia opened this issue Jul 31, 2017 · 1 comment
Closed

spec: Feature requests #21233

ldynia opened this issue Jul 31, 2017 · 1 comment

Comments

@ldynia
Copy link

ldynia commented Jul 31, 2017

I found annoying error handling in go. Namely, when you read below code you have to vocalize it to if error not nil then -which translates to if there is an error then.

if err != nil {
    // handle error
}

I would like to have abbility of expresing above code in such way -which in my opinion is more readable.

if err {
    // handle error
}

Just my humble suggestion :)

@ALTree
Copy link
Member

ALTree commented Jul 31, 2017

Thanks for the report.

Adding language support for more ergonomic error handling is the topic of issue #21161 (there are already a few ideas posted, you can write there); let's keep all the discussion about this in that thread.

Closing this as a dup of #21161.

@ALTree ALTree closed this as completed Jul 31, 2017
@mikioh mikioh changed the title Feature requests spec: Feature requests Aug 2, 2017
@golang golang locked and limited conversation to collaborators Aug 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants