Sujet : Re: Back & Forth - Co-routines
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 06. Feb 2025, 18:06:59
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2025Feb6.180659@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5 6 7 8
User-Agent : xrn 10.11
minforth@gmx.net (minforth) writes:
: foo
<: bar ." xyz" ;>
bar
;
>
I find this quite handy, since upvalues (locals within foo's
context) are accessible from within bar.
Do you implement proper static scoping? I.e., does your system pass
the man-or-boy test. What about returning xts that reference outer
locals, e.g.:
: n+ ( n -- xt ) {: n :} [: n + ;] ;
5 n+ constant 5+
3 5+ execute .
7 5+ execute .
- anton
-- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.htmlcomp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/EuroForth 2023 proceedings: http://www.euroforth.org/ef23/papers/EuroForth 2024 proceedings:
http://www.euroforth.org/ef24/papers/