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

Should convert(::Type{<:InfiniteCardinal}, x) = convert(Integer, x)? #43

Closed
LilithHafner opened this issue Jul 13, 2023 · 2 comments
Closed

Comments

@LilithHafner
Copy link
Contributor

I think that adding convert(::Type{<:InfiniteCardinal}, x) = convert(Integer, x) would allow Base.OneTo(ℵ₀) to replace OneToInf(), and also allow us to delete all zero/one/oneunit specializations, and possibly more.

This is dubious because convert(T, x) has a docstring that says Convert x to a value of type T, but InfiniteCardinal is an Integer, so this is close.

Originally posted by @LilithHafner in #42 (comment)

@vtjnash
Copy link

vtjnash commented Feb 6, 2024

as posted before:

No that isn't valid as convert(T, x) must return an element of type T

@dlfivefifty
Copy link
Member

Use Base.oneto and InfiniteArrays.jl which support ∞

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

3 participants