Specific function type

Note that this has been discussed many times already, e.g.:

Actually implementing it in a way that is compatible with Julia’s multiple dispatch is quite tricky. This is the only start at an attempt that I know of: julia#10269: Towards typed lambdas.

For example, it makes runtime behavior / dispatch (whether a particular function f is accepted as an argument of another function) potentially dependent on type inference of f, which is problematic in a dynamic language like Julia where type inference is not required to succeed — it’s only an optimization. (Unlike static languages like Rust or Haskell.)

3 Likes