|
|
|
|
|
by javitury
1403 days ago
|
|
My bad, I didn't express myself properly. The Julia language requires structs to be annotated and only those, you are right. Then if you want to reach a primitive level of type safety, function input types have to be annotated. |
|
Structs and functions do not need to have type annotations. They are completely optional and learning when to annotate is one of the first learning challenges for newcomers to the language.
There are code generation advantages to type annotations for structs, but they are not required. As for functions, this will only ever be the case if type inference fails, which should be so rare that you hardly even need to consider it.