Sujet : Re: quotations
De : minforth (at) *nospam* gmx.net (minforth)
Groupes : comp.lang.forthDate : 09. Feb 2025, 15:35:23
Autres entêtes
Organisation : novaBBS
Message-ID : <28a769be534e2d4fbab67af63bc14f04@www.novabbs.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Rocksolid Light
On Sun, 9 Feb 2025 10:36:04 +0000, Paul Rubin wrote:
So are quotations worth it for Forth? I don't know. I see some uses
for them but I'd tend to say that style is more common in GC'd
languages.
Forth quotations are embedded anonymous functions. They
produce a single execution token on the stack. No GC required.
Forth closures are not standard. But generally spoken, closures
are single-function aka one-shot objects. So gforth-specific
closures offer several ways to free used memory after use.