-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: ResultBytes #86
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e889087
feat: ResultBytes
flowchartsman 67322b6
Revert error export change
zombiezen 4c9b124
Merge branch 'main' into pr/flowchartsman/86
zombiezen 17c83c3
Add CHANGELOG notes
zombiezen 6360637
Add unit tests for Result* functions
zombiezen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revert this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I get some clarification on this? Generally, I believe that sentinel errors should be exported if they have meaningful names and convey meaningful information. In this case, they would allow the caller the option to distinguish between "the call I explicitly expected to have one result has none" and " the call I explicitly expected to have one result has more than one".
If the argument is that you deliberately want this information to be opaque, I can get behind that I suppose. The semantics of the methods that might return these errors are clear enough ("one result, or error"). That would make these errors not so much sentinel errors but helpful templates. I just want to make sure I'm clear on the reasoning behind the decision to hide this distinction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, sorry for being terse. I'm asking to revert from the standpoint that
ResultBytes
is useful on its own (and the title/focus of the PR) and I would like to merge it in. I am less sure about exporting the errors at this time, so would like to figure that outside the scope of this PR.