3 ms·
Thanks for the reply - I wasn’t sure what Julia did in terms of type inference. So, if not on local variables, where are explicit types necessary (other than f
by pansa2 7y ago
Thanks for the reply - I wasn’t sure what Julia did in terms of type inference.
So, if not on local variables, where are explicit types necessary (other than function parameters)?
- ChrisRackauckas 7y agoYou actually don't need explicit types in function parameters unless you're trying to control dispatching. Otherwise the compiler will auto-specialize on call. This blog post might be a better explanation on when it's necessary: https://www.stochasticlifestyle.com/type-dispatch-design-post-object-oriented-programming-julia/ https://www.stochasticlifestyle.com/type-dispatch-design-pos...