Email or username:

Password:

Forgot your password?
Top-level
Jonathan Joelson

@jasongorman This is interesting, because you seem to agree that writing the types and method signatures is a necessary prerequisite to writing complete tests, but of course if you stopped after writing the types and never actually finished the tests then you’ve already done a chunk of the thinking about the system’s behavior.

My original point is that the more expressive the type system, the more you’ve achieved in terms of understanding what your code will do just by writing the types.

2 comments
Jason Gorman

@jjoelson In TDD, we work backwards from the test code. It tells us what types and methods we need, and we declare those types *only* when a failing test requires it. We don't write a single line of source code that isn't required for the test. The tests drive the design.

The clue's in the name, really 🙂

Wolf480pl replied to Jason

@jasongorman @jjoelson
can you, with clear conscience, press Ctrl+S ona file that doesn't typecheck?

Go Up