On Monday, February 9, 2015 at 10:22:52 PM UTC, Jiahao Chen wrote: > > > It would be somewhat overkill to define foo(maxiter::Integer) as Julia > will generate not only the method foo(::Int), but also foo(::Int8), > foo(::BigInt) and so on for each subtype of Integer. >
Is this for sure true? I mean, my understanding was that code is only generated when a function is first called, and if say only with the parameter Int32 then there would be no difference? If you want to exclude the possibility of using BigInt then your way seems better, but why would you (say for other than array length)? If generated for every possible sub-type it would seems to be a problem for the type Any.. -- Palli.
