|
|
|
|
|
by rdtsc
3234 days ago
|
|
Good post, but note all those things you don't need a statically typed language. Erlang for example is a dynamically typed language but it has Dialyzer - a type checker. The more precisely you define the types the more discrepancies and issues it will find in the code, exactly the kind of stuff the author mentions. http://learnyousomeerlang.com/dialyzer That's technically called "success typing" http://www.it.uu.se/research/group/hipe/papers/succ_types.pd... Python has that too with MyPy. That came much later than Erlang and I haven't used yet so not sure how well it works http://mypy-lang.org/ They seemed to have copied success typing but don't actually mention it anywhere. |
|
> Python has that too with MyPy.
I don't know much about Erlang's typing, but this claim is definitely untrue. I run a code base with five engineers and I'm pretty disciplined about asking for type annotations wherever appropriate, and I still miss static typing every damn day. The grafted-on approach is definitely beneficial, and I frankly don't understand how people ran Python engineering projects of any significant size without it, but it has just enough holes in it that the type inference chain breaks often (ie just drops to type Any). It also gives false positive errors just often enough that it lowers your sensitivity to real errors.
Don't get me wrong, I'm happy it exists. But Python with types is a poor imitation of a proper engineering programming language.