|
|
|
|
|
by seanwilson
2696 days ago
|
|
> The study made no effort to determine the quality of the test and review process Assuming you wrote the article, why did you cite that study then? > That means the maximum effect must be less than 20% But what effect are you trying to argue? Maximum of what? I feel this is so vague it's not useful. In my opinion (I'm not going to try to back this up with a study that doesn't measure exactly this), types make an enormous difference while you're in the middle of development before you commit anything: they're capturing cases where you forget a variable could be undefined, when you mix up items and lists, when you want to aggressively refactor, when you forget to pass required parameters etc. Type annotations are rarely required and for the few minutes I take to write them I easily make that time back even in the short term. Only looking at the bugs that get committed (which is super hard to measure) is missing out on a big aspect of the benefits. You also need to consider that code reviews and writing TDD tests are time consuming to do as well. |
|
I do consider TDD and code reviews are costly but you can't skip them with TypeScript because at least 80% of bugs are not detectable with TypeScript.