On Sun, Jan 26, 2014 at 8:39 AM, Enoch <i...@hotmail.com> wrote: > Hi Matthias, > > Matthias Trute <mtr...@web.de> writes: > > > >> Their forward reference implementation is here: > >> openfirmware/forth/kernel/forward.fth > > > > I don't understand the code. > > > >> > >> Should we do likewise? > > > > DEFER is "good enough". > > Not for me. I have lots of mutually recusive word definitions like: > > : A ... ; \ calls B > : B ... ; \ calls A > > and spending one Edefer per each plus another indirect runtime level is > unacceptable. I can live with my current hack which I opened the > discussion with though :-) > > Regards, Enoch. > >
Just wanted to chime in and say that this is a great discussion. I often use trampoline-style dispatch: a common pattern will have a central loop that calls a dispatch word with an offset table, where each dispatch word *might* call the loop recursively in some circumstances. Clearly the loop word must be deferred, and it's a fine thing to eliminate indirection in anything called `-loop` ;-) Of course you'll blow the return stack pretty fast without tail call elimination. I confess I've looked at all the available Forths for the AVR so I can't remember if AmForth provides this capability. Cheers, -Sam. ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel