Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 Archives:
Bug reports: FAQ:
Beginner's list: