I would generally strongly recommend doing the runtime check over foisting this onto function dispatch, if for no other reason than your users will get a much better error message that specifies what went wrong with their call, rather than a generic no-method error.
Plus, it will generally be constant folded away at compile-time anyways, such that it won't actually need to incur a runtime cost. On Fri Feb 27 2015 at 10:50:10 PM Jiahao Chen <[email protected]> wrote: > Arithmetic on type parameters has been discussed but is not yet > implemented. See https://github.com/JuliaLang/julia/issues/8322 >
