I think this is the same feature discussed recently by the Symbolics and Julia compiler teams. I would be interested to see what the experts have to say on this topic.
For each of many external abstract types T
, I want to make a new abstract subtype of T
whose dispatch users control.
For example, a const LazyInteger = Lazy{Integer}
that’s a subtype of Integer
but has custom lazy method implementations.
I can implement this for certain types manually, but I don’t think it’s currently possible to represent the idea of customized subtypes of types like
abstract type Lazy{T} <: T end
What applications does this feature enable? What are the problems with it? What are the alternatives?
@Keno, @ChrisRackauckas, and others might have thoughts on this?