Comment by bpavuk
4 days ago
TypeScript does not compile to machine code (in case of Android, ART bytecode) directly. Instead, it compiles to JS, which has a lot of well-known problems and is not as performant as machine code. Yeah, iPhones not older than 3-5 years will not notice it because of Apple's best-in-class flagship chipsets, but hey, 1) not everyone in the world has an iPhone and 2) why waste computing power and battery life? WASM wouldn't exist if not for JS's poor performance - it simply would not need to! I'm still glad TS exists, though, because it fixes quite a lot of problems with JavaScript DX just by marrying it with types. The only problem of TypeScript is JavaScript. (Arguably, also Microsoft, but this is a separate discussion.) Heck, the biggest problem of the whole web IS JavaScript - that's why there is a comeback trend in HTML/CSS-centric frameworks. JS is simply unable to sustain such heavyweight frameworks as React (including React Native, which is what Bluesky uses). Such frameworks as SwiftUI and Compose are living proofs of that - while you stay with Kotlin/Native or Kotlin/JVM targets (iOS, Android, JVM desktop), your app feels snappy, assuming you wrote it well, because you stay close to the metal. Once you move to Kotlin/JS, though, you are fucked. Immediately, you lose tons of performance, making such a beautiful framework with the best animations API in the world usable only for PowerPoint-style slideshows. Kotlin/WASM backend is still experimental, but future Kotlin/JS backend deprecation is confirmed.
No comments yet
Contribute on Hacker News ↗