5

Are there other languages apart from javascript that browsers can interpret and execute. I'm happy for browser specific ones as well.

Any answers welcomed

gcameo
  • 275
  • 1
  • 3
  • 6

2 Answers2

7
  • Every language for which an interpreter written in JavaScript exists: Brainfuck, Ruby (more precisely: YARV bytecode), Scheme, Clamato, many others.
  • Every language for which a compiler exists that compiles the language to JavaScript: C, Java, JVML bytecode, CIL bytecode, Ruby, Clojure, Scala, Objective-J, Haxe, Ur, Links, Flapjax, Caja, many others.
  • Every language for which a compiler exists that compiles the language to one of the languages listed above, since you can then either interpret the output of the compiler in JavaScript, or compile it again to JavaScript. (E.g. you can compile JVML bytecode to JavaScript and you can compile Ruby to JVML bytecode, ergo you can compile Ruby to JavaScript.)
  • Every language for which an interpreter exists as a browser plugin: JVML bytecode (Java Applets), CIL bytecode (Silverlight), ActionScript bytecode (Flash), C, many others.
  • Every language which can be executed by the browser directly: VBScript (in Internet Explorer), XSLT (several browsers), x86/AMD64 machine code (Chrome Native Client), many others.

See also:

Gama11
  • 31,714
  • 9
  • 78
  • 100
Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653
1

VBScript in Internet Explorer, but nobody uses that. At least in the past (and maybe still), any Windows Script Host language would be executed by Internet Explorer.

As far as other web browsers... nothin' but Javascript, as far as I know.

Robert
  • 6,412
  • 3
  • 24
  • 26
  • And then there is plugins, like ActionScript through Flash, and native code through ActiveX, and Java through applets, but I guess all those don't qualify, because it is not the browser itself executing them. – Thilo Dec 14 '10 at 06:00