dhh1128 / intent

the intent formal language
https://intentlang.org
2 stars 1 forks source link

support type inference #47

Open dhh1128 opened 10 years ago

dhh1128 commented 10 years ago

from http://savanne.be/articles/concurrency-in-erlang-scala/: Scala uses strict-typing, yet allows most of the typing to be unspecified. When type information is not specified, the compiler will do smart type inference and attempt to infer this information from the code itself. This save programming effort and allows for more generic code. Type information is only required when the compiler cannot prove that correct type usage will happen.

and from earlier in the same article: Erlang has a dynamic type system, where the typing of expressions is checked at run-time [1]. Typing information is fully optional and only used by the static type-checker, the run-time environment even allows running applications with invalid typing specifications. Run-time type checking is always performed by looking at the types of the data itself. This usually allows applications to run correctly, even when encountering unexpected data types.