3 ms·
Context matters. Some people, while writing their own application code, find types to be annoying, a nuisance, or whatever. That's a personal (or team) decision
by nateabele 11y ago
Context matters. Some people, while writing their own application code, find types to be annoying, a nuisance, or whatever. That's a personal (or team) decision.
This article is targeted at authors and maintainers of high-adoption libraries. It says so right in the second paragraph.
And, frankly (speaking as someone with experience on this topic), he's right. Maybe static isn't always the answer, but in the context of high-adoption libraries, a little bit of effort to improve clarity and strictness is a huge lever for cutting down on wasted time of thousands of developers everywhere.
> The article doesn't really offer up any real arguments as to why you should specifically use TypeScript
Did you read it? He offers the Git/Mercurial comparison of TypeScript's growing popularity.
- zamalek 11y agoHe mentioned "contracts." You can throw off the shackles and use the `any` type internally, but at the very least your public interface should have a well-defined contract. TypeScript is one [very good] way to achieve that and it even spits out machine-readable "contract summaries" for you (.d.ts files).