|
|
|
|
|
by prance
3367 days ago
|
|
>The set of all possible assembly instructions is bigger than the set of all possible assembly instructions that haskell can compile to. No it's not. The Haskell compiler is free to use whatever assembly instructions that it sees fit to compile the Haskell program. Maybe you mean that effectively, the set of assembly programs (i.e. sequences of assembly instructions) which existing Haskell compilers happen to produce is limited. This is true. But it is also true that you can find an equivalent Haskell program for every possible assembly program, where equivalent means they exhibit the same behavior with respect to inputs and outputs. This is because both are Turing equivalent. Now, it's also true that the way two equivalent programs get to their results may differ. For example, the assembly program might be faster. However, these are non-functional properties of the programs. And you were talking explicitly about functionality, so this point doesn't count towards your argument. |
|
But this is the basic idea I was trying to convey: that you lose "expressiveness" as you get higher and higher in levels of abstraction.