This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: continuation and multi-threading
- To: djurfeldt at nada dot kth dot se
- Subject: Re: continuation and multi-threading
- From: Miroslav Silovic <silovic at zesoi dot fer dot hr>
- Date: 02 Aug 2000 00:37:31 +0200
- Cc: Keisuke Nishida <kxn30 at po dot cwru dot edu>, guile at sourceware dot cygnus dot com, djurfeldt at nada dot kth dot se
- References: <m3g0oqnjrp.fsf_-_@indy.STUDENT.CWRU.Edu> <m3d7jxa9gv.fsf@indy.STUDENT.CWRU.Edu> <p2tpunx85vu.fsf@bohne.zrz.tu-berlin.de> <m33dksvk8i.fsf@indy.STUDENT.CWRU.Edu> <200007311359.NAA00736@ruebe.zrz.tu-berlin.de> <AD4WUXvScB@khim.sch57.msk.ru> <m3wvi2m0pw.fsf@indy.STUDENT.CWRU.Edu> <87punux90c.fsf@piracy.red-bean.com> <m3ya2h1vk4.fsf@indy.STUDENT.CWRU.Edu> <873dkpwmw5.fsf@piracy.red-bean.com> <m3vgxlo5db.fsf@indy.STUDENT.CWRU.Edu> <xy73dkohlvy.fsf@mdj.nada.kth.se> <m3ittkpxav.fsf@indy.STUDENT.CWRU.Edu> <xy7ya2geoc2.fsf@mdj.nada.kth.se>
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> > If this works, I don't think I have to do anything special - just to
> > implement a few additional VM instructions. Why do I need to break
> > the stack into frame objects?
>
> Don't ask me. :)
Because that way you can get continuations to perform -fast-. :)
(i.e. on par with catch/throw &co)
While this isn't too useful (since Guile already has catch/throw),
there are things that are pretty hard to implement without
continuations. For instance, implicit backtracking (you create
something that looks like a list, but is treated as a single element
of the list, and looped through by backtracking). For this sort of
thing, you either have to aggressively transform the code in a
purpose-specific way, or implement fast continuations and then just
use them as panacea.
Of course, it's easier to say 'fast continuations' than to actually
implement them.
--
How to eff the ineffable?