Trimming partially type erased functions

I’m using FunctionWrappers.jl to create type stable wrappers for functions I know input and output types. These functions are often closures created in local scopes. When trying to trim a function from FunctionWrappers.jl (or, better, a vector of those), compilation fails. Looking at this julia issue RFC: TypedCallable · Issue #59774 · JuliaLang/julia · GitHub indeed it seems to confirm FunctionWrappers.jl is not compatible with trimming. The issue also proposes a very nice enhancement which would solve my problem, but still it isn’t implemented in Julia until today. So, I’m asking myself if also some other people encountered this issue before and/or know about techniques which can be used to trim a vector of functions with known inputs and outputs, even with no so great performance.

1 Like