Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder how hard it would be for Browsers to natively strip TypeScript syntax from the .ts files without checking and run them as .js


So no compile time checks and no runtime checks? What would the advantage of types be?


With decent dev tooling, you are getting edit-time checks equivalent to compile-time checks (the only difference is that there is no compilation after the checking), so there’s no loss. The advantage of compile-time checking has nothing to do with “compile time” except that compile time is inherently before runtime, and edit time is even earlier.


The fact that you can't run without passing the checks is an advantage to compile time checks in some particular (social) contexts, although a disadvantage in others.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: