Should `convert(::Type{<:InfiniteCardinal}, x) = convert(Integer, x)`?
LilithHafner opened this issue · comments
Lilith Orion Hafner commented
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)
Jameson Nash commented
as posted before:
No that isn't valid as convert(T, x) must return an element of type T
Sheehan Olver commented
Use Base.oneto
and InfiniteArrays.jl which support ∞