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 OAA05159; Mon, 3 May 2004 14:34:30 +0200 (MET DST) 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 OAA05276 for ; Mon, 3 May 2004 14:34:29 +0200 (MET DST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i43CYQSH001656 for ; Mon, 3 May 2004 14:34:27 +0200 Received: from [192.168.1.200] (ppp116-155.lns1.syd2.internode.on.net [150.101.116.155]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i43CYJZq047812; Mon, 3 May 2004 22:04:22 +0930 (CST) Subject: Re: [Caml-list] Re: Tail-calls in C code (was: [ANN] The Missing Library) From: skaller Reply-To: skaller@users.sourceforge.net To: Wolfgang Lux Cc: "Marcin 'Qrczak' Kowalczyk" , caml-list In-Reply-To: <82AD726A-9CF5-11D8-823C-0003937628DA@uni-muenster.de> References: <82AD726A-9CF5-11D8-823C-0003937628DA@uni-muenster.de> Content-Type: text/plain Message-Id: <1083587659.20722.656.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 03 May 2004 22:34:19 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40963C52.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 32,:01 curiously:01 passing:01 model:01 casts:01 elided:01 9660:01 glebe:01 nsw:01 snail:02 continuation:02 continuation:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 2004-05-03 at 21:32, Wolfgang Lux wrote: > http://www.cs.mu.oz.au/mercury/information/papers/mercury_to_c.ps.gz Curiously the basic continuation passing model is given as (casts elided): while(fp) fp = (*fp)(); Here's the eqivalent Felix driver loop: while(p) p = p->resume(); where the continuation is a class object, rather than a function pointer. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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