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

Functional style Optional and Result return types #99

Open
jblachly opened this issue Aug 25, 2021 · 0 comments
Open

Functional style Optional and Result return types #99

jblachly opened this issue Aug 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@jblachly
Copy link
Member

Many functions in the dhtslib namespace may either error, or only optionally return a value.

Paul Backus has an excellent library-based Optional! implementation:
https://code.dlang.org/packages/sumtype

Here is another optional/maybe package:
https://code.dlang.org/packages/optional which we should strongly consider transitioning to as return type.

Also libmir has a different optional implementation (Variant) but looks more complex:
http://mir-core.libmir.org/mir_algebraic.html
Also has a Nullable type

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

No branches or pull requests

1 participant