3 ms·
The major ones usually target an abstract machine or intermediate language which is implemented in low-level ways. Those abstract or intermediate languages help
by nickpsecurity 9y ago
The major ones usually target an abstract machine or intermediate language which is implemented in low-level ways. Those abstract or intermediate languages help the logic and function oriented languages compile easier. I'd love to see them go straight from high-level Haskel or Prolog to LLVM bytecode with LLVM's optimizations handling the rest. That would be interesting in light of your comment. Instead, the intermediate, abstract forms remain out of utility or necessity.
- tom_mellior 9y agoLLVM bitcode is too low-level for many of the optimizations, such as deforestation and similar optimizations of functional programs. It is useful for later, low-level things, and there is a good LLVM backend for GHC. At the same time, LLVM is too high-level for some other things, such as Prolog's particular brands of stack unwinding and indirect jumps on backtracking.
- nickpsecurity 9y agoThe first was expected. The second on Prolog optimizations was interesting.