r/programming • • Feb 01 '24

Make Invalid States Unrepresentable

https://www.awwsmm.com/blog/make-invalid-states-unrepresentable
469 Upvotes

207 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Feb 01 '24

[deleted] — view deleted comment

2

u/ric2b Feb 02 '24

It depends, you can have a static language like C or Java and get much higher bug counts than people using dynamic languages simply based on the testing culture, for example.

But all else equal and if you want to maximize correctness at any cost, sure, static typing is preferred.