3 ms·
> Why do people insist on restricting their static code analysis Because it's trivially easy to show cases where a static type system rejects useful and correc
by klibertp 9y ago
> Why do people insist on restricting their static code analysis
Because it's trivially easy to show cases where a static type system rejects useful and correct code.
Yes, static type systems do "eliminate whole classes of errors", but they also eliminate whole classes of correct code! Is the freedom from (some, not all!) runtime type errors really worth the loss of expressive power?
Well, the answer is of course "it depends" on specific circumstances: sometimes it's worth it, sometimes it's not and most of the time the very choice (ie. should I write in statically or dynamically typed language in this case?) is not important at all because tons of other choices have much more of an impact on whether the project succeeds or not.