Raul Miller-4 wrote: > > On Sun, May 3, 2009 at 8:53 PM, Tracy Harms <[email protected]> wrote: >> http://blog.sigfpe.com/2009/05/three-projections-of-doctor-futamura.html >> >> I found this to be a particularly interesting passage: >> >> "If we have a specialiser we never need to make a compiler again. We >> need only design interpreters that we can automatically convert to >> compilers. In general it's easier to write interpreters than compilers >> and so in principle this makes life easier for programmers. It also >> allows us to compartmentalise the building of compilers." > > I wonder how he plans on dealing with the halting problem? > There is no need for dealing with the halting problem here since specialization always turns a given function into a less complex function---while a projection of a non-computable function may or may not be computable, a projection of a computable function must be computable.
In J, for instance, adverbs: expon=:&^ nthpow=:^& define exponentiation and the nth-power operations as specializations of ^ Specialization ^&1, being equivalent to ], however, disposes of ^ operation entirely, or in other words "projects it out". An interpreter of a given programming language is more complex than a compiler of the same language. We know this also from experience, since no compiled language has "compile" command, while interpreters do have "interpret" command, which is of course ." in the case of J. Futamura then just says, among other things, that a compiler can be defined and implemented as a specializer for "interpret" command of the interpreter. -- View this message in context: http://www.nabble.com/The-Three-Projections-of-Doctor-Futamura-tp23361610s24193p23383083.html Sent from the J Chat mailing list archive at Nabble.com. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
