From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 6ACB3BBAF for ; Tue, 27 May 2008 19:59:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmcCAEvoO0jUCb2niGdsb2JhbACSPwEBAQ8gmw8 X-IronPort-AV: E=Sophos;i="4.27,549,1204498800"; d="scan'208";a="11187446" Received: from mail.enyo.de ([212.9.189.167]) by mail2-smtp-roc.national.inria.fr with ESMTP; 27 May 2008 19:59:53 +0200 Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de) by mail.enyo.de with esmtp id 1K13Se-0001g4-Ia; Tue, 27 May 2008 19:59:48 +0200 Received: from fw by deneb.enyo.de with local (Exim 4.69) (envelope-from ) id 1K13Se-0007tx-07; Tue, 27 May 2008 19:59:48 +0200 From: Florian Weimer To: "Till Varoquaux" Cc: forum@x9c.fr, caml-list@yquem.inria.fr Subject: Re: [Caml-list] [ANN] OCaml-Java project: 1.0 release References: <764D4B4A-FA1E-4672-BA9D-4195193E1C48@x9c.fr> <200805270706.20939.jon@ffconsultancy.com> <9d3ec8300805262337o6cb390f0ma986212e065132d6@mail.gmail.com> <1211873192.483bb7a8d5597@imp.ovh.net> <9d3ec8300805270136w75102bci903324b0ee8bb846@mail.gmail.com> Date: Tue, 27 May 2008 19:59:47 +0200 In-Reply-To: <9d3ec8300805270136w75102bci903324b0ee8bb846@mail.gmail.com> (Till Varoquaux's message of "Tue, 27 May 2008 09:36:46 +0100") Message-ID: <87k5hf1vcc.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam: no; 0.00; wikipedia:01 trampoline:01 invokes:01 trampoline:01 recursive:01 1.0:98 downward:98 closures:01 caml-list:01 functions:01 functions:01 tail:01 ghc:01 lisp:02 florian:03 * Till Varoquaux: > Anyways; here goes for trampolines (straight from wikipedia): > > "Used in some LISP implementations, a trampoline is a loop that > iteratively invokes thunk-returning functions. A single trampoline is > sufficient to express all control transfers of a program; a program so > expressed is trampolined or in "trampolined style"; converting a > program to trampolined style is trampolining. Trampolined functions > can be used to implement tail recursive function calls in > stack-oriented languages." I'm not sure if this is this a universally understood term. In GHC land, this is called a "mini-interpreter". The mini-interpreter doesn't have to be *that* expensive if you can avoid consing, but this seems to require whole-program analysis (or, at the very least, rather powerful inter-procedural escape analysis). I think I've heard this term mostly in the context of currying (specifically, in the implementation of downward closures in languages such as Ada).