English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Python's yield, Lisp's call-cc or C's setjmp/longjmp in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-12-16 (13:48)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Python's yield, Lisp's call-cc or C's setjmp/longjmp in OCaml

On Dec 16, 2003, at 3:13 PM, Nuutti Kotivuori wrote:

> I am wondering, does OCaml provide any variant of being able to
> bypass the normal function call and return discipline?

There are many different things you could be referring to, some of 
which OCaml does have (exceptions), some of which it doesn't 
(coroutines, first-class continuations, generators etc.).

> And if not, what are the chances of something like that seeing the
> light of day in the future? Are there any fundamental problems in
> OCaml that would make the implementation of such a thing exceedingly
> difficult?

First-class, capturable continuations are one of the things I often 
wish OCaml had, but implementing them efficiently would require 
significant changes to the execution model.

SML/NJ has efficient first-class continuations, so it's clearly 
possible, even in the presence of native compilation and exceptions.

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners