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

Common supertype for One and Zero? #7

Closed
oschulz opened this issue Jun 25, 2020 · 3 comments
Closed

Common supertype for One and Zero? #7

oschulz opened this issue Jun 25, 2020 · 3 comments

Comments

@oschulz
Copy link

oschulz commented Jun 25, 2020

Would it make sense to have something like One <: StaticBool <: Integer and Zero <: StaticBool <: Integer, since Boolean algebra is a group?

@oschulz
Copy link
Author

oschulz commented Jun 25, 2020

Ah, silly me, it's not a Boolean algebra, of course.

@oschulz oschulz closed this as completed Jun 25, 2020
@perrutquist
Copy link
Owner

There is already an unexported StaticBool.

julia> One <: Zeros.StaticBool <: Integer
true

@oschulz
Copy link
Author

oschulz commented Jun 26, 2020

Oh, sorry, must have overlooked that. But in any case, it wouldn't really form a group, mathematically, since One() + One() is not a One. :-)

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

No branches or pull requests

2 participants