Julia is dynamically typed language, so
you no need to specify the type of a variable. But in some cases, if you
specify the type of a variable it improves the performance drastically. If you
write type-stable code in your application, it improves the performance
drastically. So Julia provides option to specify the type of a variable (It is
optional).
What
is type-stable code?
Code is said to be type-stable, if the
type of every variable in application doesn’t vary over time.
Syntax
to specify type of variable
variable_name::type
variable_name::type
No comments:
Post a Comment