Comment on Is a web browser using another scripting language feasible?
CameronDev@programming.dev 2 days ago
Arguably typescript fits, it is converted to JS for runtime, but the developer writes TS. You theoretically could transpile python or lua to JS, no idea if it exists yet though.
Otherwise WASM would be the main contender, dunno if lua or python can compile to wasm, but lots of languages can.
jol@discuss.tchncs.de 1 day ago
Typescript doesn’t run on the browser. But I’m pretty sure we will see native typescript soon. At this point, TS is practically the industry standard for developing serious JavaScript.
CameronDev@programming.dev 1 day ago
I dunno, I don’t see the benefit to native TS in the browser. For compatibility, all sites will continue to serve JS, so what does TS gain anyone? And there is no performance benefit, maybe a performance hit given none of the type validation can happen until all of the scripts have downloaded, so execution can’t begin until that has happened?
I could be way off on this though, I’m not a webdev :/
jol@discuss.tchncs.de 23 hours ago
Type assertion in runtime would be really useful
CameronDev@programming.dev 21 hours ago
Can you even get runtime type assertions in TS? Isnt it all at compile time?