Earlier quoted context omitted.
> design your system first just by writing the types, Fine. > look how it works, Beutiful except it doesn't work yet because it's just types that make some shape. You could literally draw the thing with pen and paper. > go bother with implementation. And only then discover that something you have thought of as implementation detail is one of the main problems with your solution. No problem. I'll just refactor some ty…
> You could literally draw the thing with pen and paper. Paper does not tell you when something you draw is wrong. > And only then discover that something you have thought of as implementation detail is one of the main problems with your solution. What is no different from learning that something you implemented is wrong, except in that you spent less time to get the problem. Or do you expect some magical designing t…
With some things it does. At least better than your brain does. Typesystem does it even a bit better. But you end up with a picture not a program nonetheless, before you start writing implementation.
> What is no different from learning that something you implemented is wrong [...]
What is different is that with all the types you wrote, the process of problem discovery that happens during implementantion is stifled by what you wrote so far. Also you have additional temptation to contort your types and to leave it in a bad state because you wrote so much already and you'd very much want to avoid tossing that out.
My point is that you discover problem through experimentation and types make experimentation harder because they make the code in some ways harder to change. TypeScript avoids that by allowing you to use as much types as you want at any stage of problem/solution discovery but not forcing you to.