Are there any languages which compile to portable distributable bytecode which is compiled into native machine executables on first run? I'm not talking about JIT compilation, but it is similar. Would such an approach not be beneficial in many ways?
Example: compiler generates program.cofr. Similar to Java, it is in a portable bytecode format, and is only usable on systems where COFR is installed. Upon first execution of program.cofr, COFR compiles the bytecode to a native machine executable, and runs it. On subsequent executions of program.cofr, the already-generated executable is run.