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

Unwrap union #176

Merged
merged 6 commits into from
Oct 26, 2023
Merged

Unwrap union #176

merged 6 commits into from
Oct 26, 2023

Conversation

domn1995
Copy link
Owner

Closes #104.

Design notes:

  • Chose to implement only "unsafe" version that can throw an exception for now. The reason is because it's the most useful option with no easy alternative currently in the library.
  • Decided against having Unsafe in the name due to potential confusion with the unsafe keyword and because it doesn't communicate the action being performed. Unwrap doesn't have either downside and has precedent from its usage in Rust.
  • Still open to a Try() alternative that's more idiomatic C# but will let community drive that if they want it. A nullable return version might also be nice in the future as well.

@domn1995 domn1995 merged commit 8eed569 into main Oct 26, 2023
3 checks passed
@domn1995 domn1995 deleted the feat/unwrap branch October 26, 2023 04:45
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.

Unwrap union types
1 participant