Hacker News new | ask | show | jobs
by lukev 5689 days ago
> And web developers don't seem to want to use other languages, given that aside from GWT (almost) nobody cross-compiles from another language.

I've met tons who WANT to use other languages. The reason they don't cross-compile more often is that for the most part cross-compilation sucks - it is impossible to debug through, for one thing. GWT managed to get around most of these issues which is why it's so popular, but it was quite a feat, and it comes at a cost (two seperate runtimes for GWT code which are every so slightly different).

If programming in any other language for the browser was just as easy as javascript, I expect you'd see javascript usage plummet.

2 comments

To add, I get the feeling that a standard byte code would create a huge number of compilers specifically so people could use the same language they are using on the server for client work. I would also expect a VM running the byte code to migrate back to the servers.
The reason they don't cross-compile more often is that for the most part cross-compilation sucks - it is impossible to debug through, for one thing.

So, is the issue really the ability to use source debugging? We could still treat Javascript as an Intermediate Language and add a Source Pointer data format that would enable source debuggers in the cross-compiled languages.

In fact, we could build such things into Firefox and Chromium ourselves!

My point exactly. The demand for other languages is clearly not big enough for people to have hacker together an implementation of it on top of what's there today. It can be done, it's just that very few people are busy doing it.