Types in Julia are essentially tag-on values that restrict the range of potential values that can possibly be stored at this location. Being a dynamic language, these tags are relevant only to runtime values. Types are not enforced at compile time (except in rare cases); rather, they are checked at runtime. However, type information is used at compile time to generate specialized methods and different kinds of function argument.
In most dynamic languages, types are usually implicit in how values are created. Julia can, and usually is, written in this way—with no explicit type annotations. However, additionally in Julia, you can specify that variables or function parameters should be restricted to specific types using the ::
symbol. Here's an example:
foo(x::Integer) = "an integer" #Declare type of function argument foo(x::ASCIIString) = "a string" function bar(a, b) x::Int64 = 0 #Declare type of local variable y = a+b ...