static infinity
cscherrer opened this issue · comments
Chad Scherrer commented
I'm not sure whether it makes more sense here or in Static.jl, but I'd think there should be code somewhere to make this work:
julia> static(∞)
ERROR: There is no static alternative for type Infinities.Infinity.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] _no_static_type(x::Any)
@ Static ~/.julia/packages/Static/2w1BY/src/Static.jl:85
[3] static(x::Infinities.Infinity)
@ Static ~/.julia/packages/Static/2w1BY/src/Static.jl:70
[4] top-level scope
@ REPL[6]:1
Sheehan Olver commented
It would be odd for Static.jl to depend on Infinities.jl so if anything it should be the other way around
but i don't understand what a "static type" is. Is it what I would call a "Singleton type"?
Chad Scherrer commented
It's like a Val with proper subtyping and arithmetic methods, so more can be computed statically. Great trick for pushing work to compile time.
Sheehan Olver commented
I would still call that a singleton type…
yes I’ll accept a PR