I hope you appreciate now that advances in type systems are starting to converge with ideas in TDD. More work is needed, of course, but the exciting possibilities are clear.
What can TDD learn from tests? What can types learn from TDD? Personally, I’m in the strange position of using TDD for Rails work but also being aware of the possibilities in types. It’s, um, interesting. And annoying, at times. In the long term, I envision a framework where the distinction between types and tests isn’t so significant, and we are all able to work flexibly and confidently with good support from our tools. I have no idea what we should call this, though!
In the meantime, I think types work can benefit from TDD in several ways:
We should ...