4 ms·
> But now, as we all gradually adopt Test Driven Development Snorted out loud at that one. This post seems to assign value to static typing: That it aids in a
by rzwitserloot 5y ago
> But now, as we all gradually adopt Test Driven Development
Snorted out loud at that one.
This post seems to assign value to static typing: That it aids in avoiding bugs. It then makes the case that TDD will do a much better job at it, and thus, obsoletes the need for this (having 2 systems would be redundant!).
The problem is, that's just one of the many things static typing does.
static typing also deals with the general problem of discoverability: When I'm writing code, how do I know which features and functions are available, right now?
"Just read a ton of docs and be a walking dictionary of API calls" is a really bad answer to the question. So is: "Welp, re-read the intro page of the docs over and over".
A much better answer would be: Well, at the touch of a single keyboard shortcut, or even 'as you type', you get a curated list of the most likely things you'd want to do right now so you can just eyeball that as you program.
static typing makes that way, way easier to do vs. dynamic.
But, I think even as far back as 2003, Bob "TDD!" Martin was already reframing all coding issues in terms of TDD so this isn't exactly surprising.
- Lapsa 5y agoDiscoverability is really important if you live in Microsoft world with its documentation and API quality.