The static type describes the kind of data that could be associated with value. This post is part of the functional language series, and it is based on a remarkable book Programming Elm Build Safe and Maintainable Front-End Applications by Jeremy Fairbank.
string 3 and
Elm does this in compile-time because it uses
We have in StaticTypes module add function, and we try to add integer and string. Here is compilation result error:
- difference between dynamic and static type languages
- compilation vs. runtime errors