Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Dynamically evaluating OCaml code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oleg Trott <oleg_trott@c...>
Subject: Re: [Caml-list] Dynamically evaluating OCaml code
Brian Hurt wrote:

>
>Two examples of this in action.  First, consider the different ways you 
>can run Ocaml code.  You can interpret it (like Perl or Lisp, although 
>Ocaml doesn't provide eval), you can compile it to native (like Fortran or 
>C/C++), or you can use a virtual machine (like P-system Pascal or Java).  
>
>  
>

Actually, any decent Lisp implementation compiles to native code (like 
Fortran or C/C++). In my experience, after you add a bunch of type 
declarations to Lisp, it runs about as fast as OCaml native, but it runs 
interactively (with eval and everything). The issues of

1. compilation to native code
2. interactivity & runtime eval
3. strict typing (i.e. variables have types, not values)

are all orthogonal. Lisp provides 1 & 2, Ocamlopt provides 1 & 3, Ocaml 
(toplevel) provides 2 & 3, which covers all possible combinations of 2 
out of 3. I think SML/NJ gives all 3, but I don't use it, so I'm not sure.


Oleg

-------------------
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