| Deutsch English Français Italiano |
|
<87wmdzwq8w.fsf@nightsong.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Paul Rubin <no.email@nospam.invalid> Newsgroups: comp.lang.forth Subject: Re: Back & Forth - Co-routines Date: Sat, 08 Feb 2025 23:07:11 -0800 Organization: A noiseless patient Spider Lines: 10 Message-ID: <87wmdzwq8w.fsf@nightsong.com> References: <nnd$2fb29a8e$298ef3f8@23fe4f00fa62d734> <vnq10p$162l3$1@dont-email.me> <nnd$28e37865$1ff3c947@ec3118cc4d5fd42b> <874j1aycdt.fsf@nightsong.com> <nnd$68d49e22$0e1b270a@ce4705a037955a82> <3c3bdb056696f15c43fa512b5366002d@www.novabbs.com> <2025Feb6.135712@mips.complang.tuwien.ac.at> <3955434636b2a293c6a9c6d726ff6eae@www.novabbs.com> <2025Feb6.180659@mips.complang.tuwien.ac.at> <2cf9bd53562dae1241a161036e87cd6b@www.novabbs.com> <2025Feb8.120627@mips.complang.tuwien.ac.at> <d07c4acc7550b7fd08802106ba83c5dd@www.novabbs.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Sun, 09 Feb 2025 08:07:25 +0100 (CET) Injection-Info: dont-email.me; posting-host="6c11e49378f2b8bdd1762a863972deb1"; logging-data="539922"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xVnc1yC/O3QlERufPWgI1" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:PKxKpdYJuadVeSOkrUubdkEJem0= sha1:4tbzn0TDtO4YhjVHuXo6wAJjynk= Bytes: 1979 minforth@gmx.net (minforth) writes: > Thanks, that makes sense. Each call to the outer function > creates a data record for (the contexts of) each of its inner > closure(s). The context records need to be managed somehow. Most languages with closures also have garbage collection, or anyway scope-controlled deallocation like in C++. It may not be obvious, but closures are sort of the same thing as OOP, just viewed from a different angle. Storage for the internal data of OOP instances has to be managed in about the same way.