Sujet : Re: Back & Forth - Co-routines
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.forthDate : 03. Feb 2025, 21:57:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <874j1aycdt.fsf@nightsong.com>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
albert@spenarnc.xs4all.nl writes:
I maintain that if you are not in a recursive call for
a function with locals, and you try to catch the same function
call, everything is fine.
The thing about exceptions is that they occur unexpectedly. Example:
your recursive function prints something, and that works the first few
times, but then the printer runs out of paper and there is an i/o
exception. It's not the recursive function's job to handle this. The
exception throws to some outer level handler that asks the user to fix
the problem.
Adding (LOCAL) to a Forth interpreter should normally not be too
difficulot, if you control the interpreter implementation. It's the
right way to do stuff like this. Why mess around with all that awful
stack juggling for a half-working and woefully slow solution?