, 9 tweets, 1 min read Read on Twitter
Software is more like science than mathematics. Mathematical expressions are provable, scientific theories are merely demonstrable. Math is deductive. Science is empirical.

Software is empirical. We demonstrate, but do not prove, correctness.
Static typing is an attempt to make software more mathematical. Type correctness is deductive and provable. However, type correctness does not imply behavioral correctness. Even when fully type correct the behavior must be demonstrated empirically.
This doesn’t make type systems useless. On the contrary, many people find type systems to be invaluable. However, it does mean that type systems do not change software from a science to a mathematics. In the end, software remains an empirical science.
Scientific theories are demonstrated through experiments. We trust those theories only when experimental evidence is so vastly overloaded that our confidence has so many nines that we can tolerate the occasional glitch.
In software those experiments are tests. We demonstrate correctness by executing enough tests to raise our confidence to a level that has so many nines we feel safe deploying.
There is no escape from this. Whether you use static, or dynamic typing, you must still demonstrate correctness by executing tests. Static typing does not reduce that number of tests, because those tests are behavioral and empirical.
Thus, the testing burden is independent of typing. The number of tests you write and execute is unaffected by the type system of your language.
Every feature is a theory. Every such theory is verified by a battery of experiments in the form of tests.

If you can write the code for the theory of a feature, you can write the tests are are the experiments that demonstrate that feature.
Science, FTW!
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Uncle Bob Martin
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!