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.6 required=5.0 tests=AWL,NO_REAL_NAME 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 0C03ABBAF for ; Tue, 27 May 2008 09:49:33 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsAAGRZO0jVuiVnjWdsb2JhbACRPX0BAQEBCQUGBxOaJg X-IronPort-AV: E=Sophos;i="4.27,547,1204498800"; d="scan'208";a="11159145" Received: from 25.mail-out.ovh.net ([213.186.37.103]) by mail2-smtp-roc.national.inria.fr with SMTP; 27 May 2008 09:49:33 +0200 Received: (qmail 3093 invoked by uid 503); 27 May 2008 07:49:52 -0000 Received: from unknown (HELO mail15.ha.ovh.net) (213.186.33.59) by 25.mail-out.ovh.net with SMTP; 27 May 2008 07:49:51 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 27 May 2008 07:26:32 -0000 Received: from adret2.inrialpes.fr (adret2.inrialpes.fr [194.199.23.100]) by imp.ovh.net (IMP) with HTTP for ; Tue, 27 May 2008 09:26:32 +0200 Message-ID: <1211873192.483bb7a8d5597@imp.ovh.net> Date: Tue, 27 May 2008 09:26:32 +0200 From: forum@x9c.fr To: 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> In-Reply-To: <9d3ec8300805262337o6cb390f0ma986212e065132d6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Originating-IP: 194.199.23.100 X-Ovh-Tracer-Id: 13627610998793569246 X-Spam: no; 0.00; recursion:01 recursion:01 trampoline:01 1.0:98 wrote:01 wrote:01 caml-list:01 tail:01 tail:01 implemented:02 offsets:04 implement:06 implement:06 tue:06 xavier:06 Selon Till Varoquaux : > On Tue, May 27, 2008 at 7:06 AM, Jon Harrop wrote: > > On Tuesday 27 May 2008 06:46:23 forum@x9c.fr wrote: > > 4. Are tail calls fully implemented and, if not, when exactly do they work? > One cannot fully implement tail calls on the JVM: there's no such > thing as a goto or a tail call instruction. > Tail recursion can usually be done for cheap. The general requires > some expensive machinery (usually trampolines) Well, to be precise the JVM provides a "goto" instruction, albeit limited to offsets in the same method. This allows to easily implement tail calls for direct recursion (and this is done in OCaml-Java). Can you explain what you mean by "trampoline" in the Java/JVM context ? Xavier Clerc