4 ms·
Since when Erlang is weakly typed? It is dynamic strongly typed.
by asabil 8y ago
Since when Erlang is weakly typed? It is dynamic strongly typed.
- jerf 8y agoThe type of strong typing that Erlang has is not a useful definition of the term, as the only weakly-typed language in current use would be assembler. By any other useful definition of the term, Erlang is weakly typed. Erlang + Dialyser can be read as incrementally typed, if you follow my idiosyncratic view of considering the entire programming environment in such decisions rather than just the language itself, but I don't think that's a majority viewpoint, and still doesn't yield a strongly typed language... just an incrementally typed one.
- hauleth 8y agoAs far as I know there is no way for Erlang to automatically cast between types (except numeric, but these are treated as one type with variants), so by any definition that I know it is strongly typed language. Dynamically typed, yes, but strongly. About other languages that are weakly typed in "current use": - JavaScript is still weakly typed as far as I am concerned, nothing prevents you from 0 == "" and get true value. - PHP is still weakly typed, with optional type hinting but still sometimes can bite you in the ass Erlang + Dialyser can be read as quasi-static typing, but it is still strong one.