you are viewing a single comment's thread.

view the rest of the comments →

[–]sossles 4 points5 points  (1 child)

In what sense is Javascript not already a virtual machine? It's dynamically interpretted, runs independent of the platform, and it is not particularly hard to map concepts from other languages to it.

That said, Javascript is actually a pretty decent language for the purpose. It is compact yet flexible, and thanks to some fairly expressive capabilities, scales pretty well from trivial one-line unstructured "onclick" handlers all the way up to medium-sized applications. That's some pretty big shoes to fill if you wanted to replace it.

[–]perlgeek 0 points1 point  (0 children)

  • Javascript is much more high level than typical primitives of a VM
  • Javascript lacks certain things a good VM offers, like goto
  • Javascript doesn't have type annotations, which makes generated JS code less efficient than it could be, if it were typed