Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The GWT approach has its own downsides as well.


A) GWT is 20 years old and not similar to how modern transpilation works

B) What are the downsides?


The built in browser debugger is incredibly good. As long as the transpilation is simple and matches JS semantics you can still use the debugger. I haven't seen good debugging tools when using languages more distant from JS but I'd love to know if they've become viable.


You've been able to debug TypeScript (and anything else that transpiles to JS) natively in the browser for years using sourcemaps. That includes Dart, C#/F#, Go (as far as I know), and Python.

For the languages that target wasm instead, there are different debugging stories. Kotlin's is very good, Rust's is pretty immature.


Source maps are not sufficient to fully expose the semantics of the language being debugged to the debugger. You also need the expression evaluator (for stuff like Watch etc) to understand what it's debugging. And in cases where transpilation includes nontrivial mapping of data structures, you also need the ability to do that mapping in reverse to display the values.

Source maps work great for TS because it is just "JavaScript with types" at this point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: