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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id D1A80BC0C for ; Sun, 24 Dec 2006 01:12:48 +0100 (CET) Received: from mta3.srv.hcvlny.cv.net (mta3.srv.hcvlny.cv.net [167.206.4.198]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBO0CljD012497 for ; Sun, 24 Dec 2006 01:12:48 +0100 Received: from [192.168.15.101] (ool-457da870.dyn.optonline.net [69.125.168.112]) by mta3.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTP id <0JAR0016M4LAXSD0@mta3.srv.hcvlny.cv.net> for caml-list@yquem.inria.fr; Sat, 23 Dec 2006 19:12:47 -0500 (EST) Date: Sat, 23 Dec 2006 19:15:52 -0500 From: Serge Aleynikov Subject: Re: [Caml-list] Scripting in ocaml In-reply-to: <200612231850.04578.jon@ffconsultancy.com> To: Jon Harrop Cc: caml-list@yquem.inria.fr Message-id: <458DC6B8.8070400@hq.idt.net> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT References: <6dbd4d000612201941wcd4b09anc503a13889576512@mail.gmail.com> <1166709162.5653.11.camel@rosella.wigram> <458AA143.3090303@hq.idt.net> <200612231850.04578.jon@ffconsultancy.com> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) X-Miltered: at concorde with ID 458DC600.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 intentional:01 unrolling:01 ocaml's:01 run-time:01 run-time:01 bytecode:01 syntax:01 inference:01 type-checker:01 compiler:01 reloading:01 marshaling:01 wrote:01 Jon Harrop wrote: > On Thursday 21 December 2006 14:59, Serge Aleynikov wrote: >> OCaml has static typing but doesn't provide an actual location of code >> in exceptions. Is it because it was hard or intentional? > > F# uses .NET exceptions. They do provide such information but they are so slow > that you must painstakingly avoid any use of exceptions in performance > critical code, boxing and unrolling manually if necessary. This is in stark > contrast to OCaml's lightning fast exceptions that are used as the basis of > optimisations. I wonder if you or anyone on the list have done any benchmarking of F#/Mono vs. OCaml on Linux/Solaris. If so, could you please provide some relevant links? > What do you mean by "run-time static analysis"? Surely if something is > analysed at run-time then it cannot be static by definition? Sorry, I meant post-compilation static analysis. The kind of analysis that allows to traverse bytecode abstract syntax tree and through type inference make conclusions about type errors. For example see the "Identified discrepancies" section of the Dialyzer (the tool that does post-compilation analysis): http://www.die.net/doc/linux/man/man3/dialyzer.3.html Such a tool can give power to a dynamically typed language comparable to a static type-checker embedded in the compiler, while still allowing for having run-time safety features in presence of code reloading, cross-program message passing, marshaling, etc. Serge