Sujet : Re: Back & Forth - Co-routines
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.forthDate : 09. Feb 2025, 08:07:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87wmdzwq8w.fsf@nightsong.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
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.