| > There are many libraries in Haskell which aren't even possible to write in Java (automatic differentiation, parser combinators, lenses, etc.) So you're saying Alan Turing was wrong? Publish your finding, win a Nobel Prize. You didn't say it would be difficult, you said it wasn't possible. Here's the breakdown: 1. Haskell is compiled into machine code. 2. Machine code doesn't care or reveal where it came from. 3. Points (1) and (2) demonstrate that any algorithm that can be written in Haskell, can also be written in machine code. 4. Therefore the claim that Haskell's libraries cannot be written in Java is false. |
It's completely possible to have a Turing-complete method of computation that does not allow the equivalent of self-modification, for example. And then you won't be able to write a library for self-modifying code!
You can't retrofit Java with a macro system without writing a preprocessor, for example. So it is impossible to have a whole bunch of useful constructs in a library.
Essentially, as soon as you consider "self-reference"--that is, programs that depend on details of the machine itself--Turing-completeness stops mattering. And this is still important; programmers care about more than just what the program does, after all!