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 OAA23826; Tue, 16 Dec 2003 14:28:13 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA23938 for ; Tue, 16 Dec 2003 14:28:11 +0100 (MET) Received: from brazilnut.cc.columbia.edu (brazilnut.cc.columbia.edu [128.59.59.203]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hBGDSAH26430 for ; Tue, 16 Dec 2003 14:28:10 +0100 (MET) Received: from tw304h3.cpmc.columbia.edu (tw304h3.cpmc.columbia.edu [156.111.84.180]) (user=ot14 mech=LOGIN bits=0) by brazilnut.cc.columbia.edu (8.12.10/8.12.10) with ESMTP id hBGDS8g4023726 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Tue, 16 Dec 2003 08:28:09 -0500 (EST) From: Oleg Trott To: Nuutti Kotivuori , caml-list@inria.fr Subject: Re: [Caml-list] Python's yield, Lisp's call-cc or C's setjmp/longjmp in OCaml Date: Tue, 16 Dec 2003 08:28:02 -0500 User-Agent: KMail/1.5.4 References: <87n09sucr9.fsf@naked.iki.fi> In-Reply-To: <87n09sucr9.fsf@naked.iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200312160828.02480.oleg_trott@columbia.edu> X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.35 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; oleg:01 oleg:01 caml-list:01 python's:01 lisp's:01 c's:01 generic:01 python's:01 lisp's:01 c's:01 ocaml:01 ocaml:01 lisp:01 continuation:02 variant:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tuesday 16 December 2003 08:13 am, Nuutti Kotivuori wrote: > I am wondering, does OCaml provide any variant of being able to > bypass the normal function call and return discipline? > > More or less generic implementations of this can be seen in for > example Python's yield instruction, Lisp's call-cc or call with > current continuation, or C's setjmp/longjmp. call/cc is Scheme, Common Lisp has "throw" instead, and ML has "raise". > 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? > > Just curiosity at this point. -- Oleg Trott ------------------- 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