3 ms·
The attractive part for me when considering TypeScript was that it had 0 runtime overhead, while coding in a type safe manner. If I use nothing but types via m
by smrtinsert 12y ago
The attractive part for me when considering TypeScript was that it had 0 runtime overhead, while coding in a type safe manner. If I use nothing but types via my TypeScript code, isn't Safe TypeScript simply just overhead?
- secoif 12y agoCompile-time checks can't make guarantees about 3rd party code or user input.
- ufo 12y agoThe overhead of safe typescript is only in the parts of your code that interact with untyped code. For those parts the default typescript was actually unsafe.
- smrtinsert 12y agoI see. This adds soundness to an entire application ts or non ts.
- ufo 12y agoThe main goal of a sound gradual type system is to make it so that any type errors can be "blamed" on the untyped part of the code. For example, if untyped code calls a safe-typescript function and passes the wrong argument type safe-typescript will check and detect the error right away. On the other hand, traditional typescript would accept the invalid parameter without checking and would eventually throw a "method missing" exception somewhere down the line.