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

Finite Enlightenment #39

Closed
ripytide opened this issue Apr 20, 2023 · 0 comments · Fixed by #41
Closed

Finite Enlightenment #39

ripytide opened this issue Apr 20, 2023 · 0 comments · Fixed by #41
Labels
dehancement Removal of a feature enhancement New feature or request

Comments

@ripytide
Copy link
Owner

Seemingly on a never-ending path of enlightenment for my faulty base assumptions with this library. Next up is that Finite-ness is unnecessary to represent explicitly within the library since all finite discrete types have a MAX and MIN values anyway.

And in fact the specific way I can represent Infinite types with an enum to make code nicer is as follows:

enum PossiblyInfinite {
    //start, end
    Finite(BaseType, BaseType),
    //start
    Infinite(BaseType),
}

impl RangeBounds<BaseType> for PossiblyInfinite {
..... blah blah 
Infinite(start).end_bound() = Bound::Included(BaseType::MAX)!!!!
@ripytide ripytide added enhancement New feature or request dehancement Removal of a feature labels Apr 20, 2023
This was referenced Apr 21, 2023
@ripytide ripytide linked a pull request Apr 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dehancement Removal of a feature enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant