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

[Enhancement] add cleaner and more efficient error handling #92

Open
MadhavJivrajani opened this issue Feb 1, 2021 · 1 comment
Open
Labels
discussion issue needs to be discussed and decision neeeds to be taken. enhancement New feature or request priority: medium

Comments

@MadhavJivrajani
Copy link
Member

MadhavJivrajani commented Feb 1, 2021

Currenltly, error handling is done in the usual pattern of

err := something()
if err != nil {
    return err // propagate err up the function call chain
}

However, this might not be the most robust and efficient way to do this as mentioned in this super interesting talk.

The main take away from this are that the current versions of Go pass return values around in memory rather than in registers as done by languages like C++. An excellent reference for the same can be found here. Therefore, doing error handling in the above mentioned form may not prove to be as efficient as one might like.

Some discussion might be required in terms of what approaches to use and if we should introduce external dependencies to handle the same, before proceeding with this issue in. Discussion can take place on the Discussions tab.

@MadhavJivrajani MadhavJivrajani added enhancement New feature or request priority: medium discussion issue needs to be discussed and decision neeeds to be taken. labels Feb 1, 2021
@MadhavJivrajani
Copy link
Member Author

Discussion thread #94

@Gituser143 Gituser143 added the hacktoberfest Issues for Hacktoberfest 2021 label Sep 30, 2021
@Gituser143 Gituser143 removed the hacktoberfest Issues for Hacktoberfest 2021 label Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion issue needs to be discussed and decision neeeds to be taken. enhancement New feature or request priority: medium
Projects
None yet
Development

No branches or pull requests

2 participants