Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.forth Subject: Re: Coroutines in Forth Date: Fri, 24 Apr 2026 10:36:30 -0700 Organization: A noiseless patient Spider Lines: 18 Message-ID: <87wlxw45wh.fsf@nightsong.com> References: <10qunhm$1nnbt$1@dont-email.me> <10r1825$2d8j6$1@dont-email.me> <69db0856$1@news.ausics.net> <871pg66epy.fsf@nightsong.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Fri, 24 Apr 2026 17:36:30 +0000 (UTC) Injection-Info: dont-email.me; posting-host="08c798c78de11d74cf31823145047fd9"; logging-data="270827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Zdmlf5jXjiPi/+raUm8FD" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:XOOx1DGwj08HfZ4k4BwDky79nBU= sha1:DCJ5noGnohru1Pl/X8h7ocxOV04= Xref: csiph.com comp.lang.forth:134951 Hans Bezemer writes: > I know there are situations when there are six values on the data > stack and four on the return stack which leave you with few other > options. But you can always use vanilla variables or an extra stack > (which is trivial to implement) to remedy that. > > Using Forth means being resourceful. Not to choose the most convenient > and lazy solution imaginable. Stack allocation is efficient because stack storage is released when the function returns. Global variables instead occupy storage even when the function isn't in use. And, implementing an extra stack under the interpreter is both extra contortions and extra overhead. "Resourceful" sounds more like "masochistic" here. I thought the idea was to do the straightforward thing. There is really something that I'm missing. I do remember writing some words a while ago to implement multiple stacks, so there are reasons to want those sometimes.