(Manfred, you and I seem to be talking to ourselves, but what
the hell...)
Joy lends itself to extremely easy inlining: when defining a
word, you can simply replace any user-defined word in the body
with *its* body, recursively, but watching for references to
words already being inlined (so that you do not get into an
infinite expansion). The implementation should be extremely
easy.
However, I can think of at least three policies for deciding
whether to inline or not:
1) Mark inlineable words (e.g. by starting the definition
with INLINE instead of DEFINE/LIBRA). Any word so marked
is always inlined when it is used in a definition, subject
to the caveat above.
2) Have a global mode: when on, we do inlining on every
definition; when off, we don't inline during definition.
(Once a definition is inlined, it stays inlined regardless
of the mode.)
3) Just inline everything.
In any case we also need a small dependency tracker so that
we can decide what definitions get broken when a definition
that they inline gets changed.
Any thoughts, anyone? Do Forth compilers inline? What
about dependency tracking?
--
There is / one art || John Cowan <
jcowan@...>
no more / no less ||
http://www.reutershealth.com
to do / all things ||
http://www.ccil.org/~cowan
with art- / lessness \\ -- Piet Hein