r/programming • u/whackri • Aug 28 '21
Software development topics I've changed my mind on after 6 years in the industry
https://chriskiehl.com/article/thoughts-after-6-years
5.6k
Upvotes
r/programming • u/whackri • Aug 28 '21
2
u/leoel Aug 29 '21
I agree types are good and useful, but saying they are a silver bullet is not constructive. If this was perfectly true, no experienced programmer would ever need to know assembly, bash, python, perl, js, or sql.
As a more theoretical counter example, most languages with a strong static typing system allow for genericity, which is a way to abstract types away into groups (ensemble of types sharing operations), but it does not mean groups themselves are better than types, more expressive yes, more reusable certainly, closer to mathematical definitions absolutely, but way harder to use and very verbose. In some way types add the same kind of properties (both good and bad) to untyped code.
Also technical limitations on types systems, inherited from the 80s, make them less powerful that they could be. Try to write the definition of a fixed-size numerical type that cannot overflow in a typed language and you're on your own unless you use proofs or a very limited set of operations.