3 ms·
In the end, you have to transpile your code to JavaScript. Whether you are writing TypeScript or Swift code. But I agree, Typescript has more similarities with
by onra87 8y ago
In the end, you have to transpile your code to JavaScript. Whether you are writing TypeScript or Swift code.
But I agree, Typescript has more similarities with JS than Swift does.
- Vinnl 8y agoThat is true, but there are a lot of risks associated with transpiling completely different languages that are not there when using TypeScript. For example, if TypeScript ever goes away, you simply transpile it to Javascript once (i.e. strip away the explicit type annotations) and continue to work on the resulting Javascript - in a different language, that would be a complete mess. Furthermore, TypeScript integrates really neatly with the rest of the Javascript ecosystem (because it's just Javascript), saving you a lot of hassle and lock-in. Reducing all that to "but it has to be transpiled to Javascript" is a simplification that doesn't help in highlighting potential concerns associated with transpilation, in my opinion.
- onra87 8y agoI totally agree with you. My point here was just to prove that you cannot sell the beauty of JavaScript syntax by saying that you have to use TypeScript :)
- Vinnl 8y agoHaha, that's true, though I guess in the context of this article that's mostly semantics, since it says that tooling (like TypeScript) is part of what makes "Javascript" great :)