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

Do you think it's also worrying that we all communicate in English? Is the English language a stagnated monoculture?

Pandering to language fanboys isn't a good idea. Javascript is a good enough language, and if you don't like it, write in something else and compile it to javascript.



I'm not smart or experienced enough to know the answer to this, it's an honest question. Doesn't compiling things to javascript inherently limit what we can do? For example, if a feature is supported in some other language but not javascript then I imagine even if there were a way to compile to javascript, there might be a severe performance impact.

I guess what I am saying is that it seems like we are stuck with javascript for historical reasons and it's a shame that we aren't exploring other options. Of course, I can also completely see that sticking with javascript is the most practical option as well.


> Doesn't compiling things to javascript inherently limit what we can do?

Yes, any concrete compilation target has limitations, including JavaScript.

For example, in JavaScript, there are no 64-bit integers, which can slow down some code. As another example, strings on .NET and Python are different, causing Python on the CLR to either behave differently or run more slowly.

I think the important thing to realize is that there isn't a "perfect" compilation target. What we really want is a target that is (1) fast on all languages, (2) portable to run on all OSes and architectures, and (3) safe to run in a sandboxed manner. There is no target I am aware of that maximizes all 3. All we can do is try to get close.

I would say that JavaScript is doing pretty well in that respect already (that is, like all other options, it isn't perfect, but it's relatively decent), and remaining missing features are being worked on.

> it's a shame that we aren't exploring other options.

I don't think that's true at all - such experiments have been done! We had or have ActiveX, Java, Flash with its multiple VMs, Silverlight/.NET, NaCl, PNaCl, and others I forgot.

Given the performance of JavaScript engines today, those experiments of other VMs don't show a big enough reason to prefer them. asm.js code runs fast enough to run AAA game engines, which is a very good test.


Thanks for the response. I'm glad to see that I was wrong. asm.js looks extremely promising




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

Search: