3 ms·
Well, you could, if people really wanted to, have some sort of runtime type safety, but doesn't seem like that's what people want for various reasons, one thing
by capableweb 5y ago
Well, you could, if people really wanted to, have some sort of runtime type safety, but doesn't seem like that's what people want for various reasons, one thing could be the possible performance impact. Instead, TypeScript only offers type safety at development time.
It seems matsemann fundamentally missed the idea of TypeScript, as it's very clear it only offers compile-time checks and nothing for the runtime.
- pjmlp 5y agoIdeally one day TypeScript would take JavaScript's place, but no browser vendor seems keen on the idea. On the other hand, TypeScript success in adoption is based on following another proven attempts, C++ and Objective-C. With such approaches, the warts of the copy-paste compatibility with the underlying platform are both a sin and a curse.
- capableweb 5y ago> Ideally one day TypeScript would take JavaScript's place, but no browser vendor seems keen on the idea. Oh god I hope not. JavaScript is hopefully here to stay, and will remain the runtime of the web together with WASM. TypeScript is a neat idea for enterprise companies where engineering standards tend to not be that great, but that doesn't mean we should lower the possibilities of the current runtime to the lowest common denominator.
- pjmlp 5y agoIt would still be possible to write JavaScript like code, that is Typescript selling point vs CoffeeScript and Dart, so I don't see a problem with it.
- matsemann 5y agoMy point is that I can change what I pass in in my code, and the compile time check doesn't catch it. I haven't "fundamentally missed" anything, it's you misreading my post, thanks.