From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA24815; Tue, 16 Dec 2003 14:48:01 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA23995 for ; Tue, 16 Dec 2003 14:47:59 +0100 (MET) Received: from oxy.exomi.com (fa-3-0-0.fw.exomi.com [217.169.64.99]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hBGDlxX03905 for ; Tue, 16 Dec 2003 14:47:59 +0100 (MET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by oxy.exomi.com (Postfix) with ESMTP id 2D4ECCF05B; Tue, 16 Dec 2003 15:48:12 +0200 (EET) In-Reply-To: <87n09sucr9.fsf@naked.iki.fi> References: <87n09sucr9.fsf@naked.iki.fi> Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <7CE71DB5-2FCE-11D8-90E3-000393863F70@exomi.com> Content-Transfer-Encoding: 7bit Cc: caml-list@inria.fr From: Ville-Pertti Keinonen Subject: Re: [Caml-list] Python's yield, Lisp's call-cc or C's setjmp/longjmp in OCaml Date: Tue, 16 Dec 2003 15:48:11 +0200 To: Nuutti Kotivuori X-Mailer: Apple Mail (2.606) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 python's:01 lisp's:01 c's:01 coroutines:01 model:01 ocaml:01 ocaml:01 sml:01 variant:02 first-class:02 first-class:02 native:02 wrote:03 exceptions:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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