Skip to main content
Copy edited (e.g. ref. <http://en.wikipedia.org/wiki/Java_%28programming_language%29> and <http://en.wikipedia.org/wiki/Scala_%28programming_language%29>). Added some context.
Source Link

"All" programming languages run on x86, so how can they be much different from each other?

BrainfuckBrainfuck and haskellHaskell are both turing completeTuring complete, so they can both do the exact same tasks.

There's a bit of room for syntax changes, syntax sugar and compiler magic in between. You can do quite a lot in there, but there is always a limit. In your case, it's JVM byte code.

If javaJava can produce the same byte code as scalaScala, they are equivalent. It could, however, be the case that a new feature in the JVM gets implemented in only scalaScala. Very unlikely, but possible.

"All" programming languages run on x86, so how can they be much different from each other?

Brainfuck and haskell are both turing complete, so they can both do the exact same tasks.

There's a bit of room for syntax changes, syntax sugar and compiler magic in between. You can do quite a lot in there, but there is always a limit. In your case, it's JVM byte code.

If java can produce the same byte code as scala, they are equivalent. It could, however, be the case that a new feature in the JVM gets implemented in only scala. Very unlikely, but possible.

"All" programming languages run on x86, so how can they be much different from each other?

Brainfuck and Haskell are both Turing complete, so they can both do the exact same tasks.

There's a bit of room for syntax changes, syntax sugar and compiler magic in between. You can do quite a lot in there, but there is always a limit. In your case, it's JVM byte code.

If Java can produce the same byte code as Scala, they are equivalent. It could, however, be the case that a new feature in the JVM gets implemented in only Scala. Very unlikely, but possible.

Source Link
Drathier
  • 2.9k
  • 3
  • 18
  • 21

"All" programming languages run on x86, so how can they be much different from each other?

Brainfuck and haskell are both turing complete, so they can both do the exact same tasks.

There's a bit of room for syntax changes, syntax sugar and compiler magic in between. You can do quite a lot in there, but there is always a limit. In your case, it's JVM byte code.

If java can produce the same byte code as scala, they are equivalent. It could, however, be the case that a new feature in the JVM gets implemented in only scala. Very unlikely, but possible.