3 ms·
You could say that for applicative code static typing : it's only useful for multiple callers of your apis. But it can be useful. More generally, the multiple
by makapuf 6y ago
You could say that for applicative code static typing : it's only useful for multiple callers of your apis. But it can be useful. More generally, the multiple applications can be: the one I write, the one I will refactor to, the one my colleague writes, sqlite3 when manually called for misc. operations and/or sqlite3 when called by admin scripts.
- slver 6y agoIt is actually the same in static typing. JavaScript didn't need formal classes and argument and return types, until Node, NPM, and other large scale projects made those necessary (ergo, TypeScript). Even when using TypeScript, typing your local variables isn't THAT useful. Some do it out of sense of diligence, but the odds are you know what's the type of a local variable in a 30 line method, just by looking at the code. But for libraries to cooperate, or even people to cooperate within a single large project, that represents objects and functions used by multiple callers who don't know that code by heart, and aren't looking at its implementation while using it. Hence, types.