Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Scripting in ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-12-24 (00:12)
From: Serge Aleynikov <serge@h...>
Subject: Re: [Caml-list] Scripting in ocaml
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):

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.