IsDef.jl provides maintainable type inference in that it
In this talk IsDef.jl is presented, along with typical applications and details about the implementation.
I am super happy to announce the release of IsDef.jl. Since years I wanted to be able to check whether some function is defined for my types. Plain applicable
was not enough for me, because it just inspects the first layer, and if this is a generic function (like syntactic sugar), it won't give meaningful results. That was the motivation.
It turns out, you need full-fledged type-inference for this, however Julia's default type-inference is not intended for usage in packages. Inference is not guaranteed to be stable, may be indeterministic, and may change on any minor Julia version, which makes it really hard for maintainability. The purpose of Julia's default type-inference is just code-optimization and as such it is an implementation detail to Julia.
Hence, there is a need for another type inference system, or at least a layer around Julia's default inference which makes it maintainable. Welcome to IsDef
.
The highlevel interface of IsDef is very simple, consisting of two functions isdef
and Out
. The usage of these will be explained, along with implementation details and design decisions.
The package version is 0.1.x - suggestions, critics, and improvement ideas about the way inference is made maintainable are very welcome so that IsDef.jl can become the go-to package for maintainable type inference.