|
|
|
|
|
by ng12
2696 days ago
|
|
> Type correctness does not guarantee program correctness. Yeah, obviously. Think about it -- when you write the code you still think about the "types", you're just not writing them down. Typescript's virtues are completely related to developer productivity. Documenting your code with types, better autocompletion, catching silly mistakes before needing to run it in a browser, getting new people up to speed, etc. |
|
For example, if you know that a function takes a generic list and returns an integer, then the list’s length is pretty much the only non-trivial computation it can perform.