Lambda (was: Refactoring in Tunes)
Thu, 13 Jan 2000 17:06:11 +0100
Laurent Martelli wrote:
> >>>>> "Massimo" == Massimo Dentico <email@example.com> writes:
> Massimo> Surely OIL is not so big compared to other interpreters but
> Massimo> you need a C++ compiler to bootstrap it and an host OS to
> Massimo> run it (as the vast majority of the existing interpreters
> Massimo> and compilers).
> The need of C++ compiler is just an implementation issue. i could very
> have written in assemblor, and it would be as portable. At that point,
> it would be fairly easy to compile OIL into a "kernel" that can
> bootstrap on bare hardware. But I don't see any need for this. At
> least now. I just felt that to start with, C++ was a good compromise
> between portability and efficiency.
> Laurent Martelli
This type of portability is a *myth*. As soon as you use a non
standard library you immediatly obtain a non portable program. The
effort of porting your application from an environment to another
is as big as more you use non standard libraries.
To obtain true portability you need a good virtual machine or a
complete metaprogramming environment. Forth has a tiny, quite fast
virtual machine that you can easily port *manually* without much
effort just in virtue of his size OR you can metacompile it to
another target machine (evidence of these facts: the proliferation
of Forth implementations). So you can obtain a better compromise
between portability and efficiency.
An essay on "Forth Meta Compilation":
Of course, to run OIL on the bare hardware you need to port your
interpreter (your virtual machine) to other machines OR to write
a compiler for OIL. It's not sufficient to rewrite OIL in OIL.
Take it as a friendly warning, *not* as a provocation.