4 ms·
Static typing provides more information for the programmer and for the runtime. More information makes the code somewhat readable and understandable 10 years a
by antocv 12y ago
Static typing provides more information for the programmer and for the runtime.
More information makes the code somewhat readable and understandable 10 years after when it was written. Dynamic typing often becomes a much more messy affair.
Static typing is beneficial when you want to catch a certain type of errors before your code enters production, it makes you write less error prone code.
- lispm 12y agoNot my experience. Dynamically typed OO language carry enough information around.
- oldmanjay 12y agothe point is that in statically typed languages, the type information is used at compile time, and the computer can reason about certain types of errors for you prior to execution. in dynamic languages, the type information may well be there, but you need to exercise the code at runtime (via tests or whatever, but still runtime) to make use of it.
- lispm 12y agoTrue, but code is running. If it's not used, then the error won't be relevant anyway. I'm not talking about rocket, aircraft, power plant software. But even there, I never heard that any of those really critical domains use Haskell (or similar) in their control systems.