Concatenative topics
Concatenative meta
Other languages
Meta
There are two primary issues to make a language metacircular
Even with all the magic of adaptive dynamic feedback profiling just-in-time recompilation, code will not reliably achieve the performance of C. After all, we can write inefficient code even in C. While a very fancy runtime system will sometimes achieve some heroic feats, declaring our intent to the compiler seems to be an easier way to write stable, production quality code with reliable performance. However there is a fine line between giving the compiler well defined semantics, and writing portable assembly (aka writing C code).
There is not much intent we can express in C, and while a high level language provides the adequate framework for a more civil cooperation with the compiler, the full semantics of an open dynamically typed system introduce uncertainties that cripple low level optimization. The obvious 'solution' is to write code in a language subset that has C semantics. This doesn't solve the problem, but avoids it. A more promising approach is to introduce self-imposed limits that the compiler can exploit (see Fortran: the compilers are very good at optimizing some forms of computations thanks to better aliasing control)
Sealing looks like a promising way to guide the compiler into writing optimal code without having to write it ourselves. However, it imposes severe restrictions on code reuse, and affects generic high level code, where limits are a nuisance that dynamic languages are engineered to avoid. Dynamic sealing might provide a more powerful mechanism that allows fine-grained control of the semantic limitations we want to apply on some specific code.
This revision created on Wed, 22 Oct 2008 20:16:31 by mnestic (/Factor/Dynamic sealing not working)