4 ms·
TypeScript extends the syntax to support type annotations; it's not trying to fundamentally fix JS syntax.
by throwaway894345 7y ago
TypeScript extends the syntax to support type annotations; it's not trying to fundamentally fix JS syntax.
- erichocean 7y agoNow enforcing type safety isn't a fundamental part of a language? I get the impression that you'd dismiss Rust as "basically C". ¯\_(ツ)_/¯
- thedufer 7y agoIt is, that's the point. Reason is, as was said upthread, a "veneer". It changes the syntax only, nothing else is different (you can convert back and forth between the syntaxes losslessly). TypeScript makes deep changes to the language by adding type safety.
- throwaway894345 7y agoI have no idea how you got that from my post. I don’t know whether type safety is “a fundamental part of a language” or not, but that’s irrelevant to my point. TS extends the JS syntax to support type safety. Reason changes OCaml’s syntax altogether because it’s broken. Big difference.