Definitely agree on the first, that's a good point. I probably should've been better about how I presented the data.
"TypeScript still compiles down to JavaScript. It has no way of actually checking types." That's my point. Maybe I should make it more obvious in the article :) I'm not complaining about the fact that TS has classes or types, it's that TS compiles down to a language that has neither.
TypeScript is certainly not flawless and there are tradeoffs. But this is not a good argument against TypeScript. The point of TypeScript and any other statically typed programming language is to have type checking performed statically, that is before the code is actually translated into machine instructions and run.
Hello, at the end of the day it's all wildly swinging voltages imperfectly mapped to ones and zeroes. There are no types in any of this. It's all a huge number of abstractions stacked on top of each other.
The implication that because TypeScript compiles to JS which has no types and is therefore wrong is pure drivel.
That argument doesn't really make sense. The type system is a feature of the compiler, so why would the output of the compiler need to be aware of it? Lots of typed languages compile to machine language, which has no inherent type system.
Compilers which do add type information into the output are usually paired with a runtime that uses it for things like late binding or dynamic dispatch, but JavaScript doesn't support anything like that.
Could you give a concrete example of a scenario in which the flexibility of the JavaScript type system would break the TypeScript type system?
Your quarrel is not with JavaScript (as everyone else has pointed out, there’s no reason one can’t build a secure compile-time type system on top of JavaScript), but with some of the specific design decisions made by TypeScript that open soundness holes, such as “programmers are too stupid to understand the difference between covariance and contravariance, so we’ll pretend everything is bivariant”.
Forgive me if I misunderstand, I still don't understand your concern – TypeScript has type safety because it can check types at compile time (vs. JavaScript which has very limited type safety at run time). I don't think it's fair to call it a facade, because it is definitely commonly accepted as type safe.
"TypeScript still compiles down to JavaScript. It has no way of actually checking types." That's my point. Maybe I should make it more obvious in the article :) I'm not complaining about the fact that TS has classes or types, it's that TS compiles down to a language that has neither.