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
[Caml-list] Alternative Bytecodes for OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-08-27 (13:58)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Alternative Bytecodes for OCaml
On Fri, 2004-08-27 at 23:09, John Goerzen wrote:

> While there are plenty of places where every last bit of performance is 
> vital, there are also plenty of places (I dare say even more) where 
> it's simply not an important consideration, and things like developer 
> productivity, bug-free code, or ease of distribution really shine.

So the bottom line is you have to have a high performance
system for those places where you need the performance.

You simply need something BOTH high level and also fast,
and Ocaml provides both, at the expense of breaking
the object model used by C. Python is high level
but not fast or C compatible.

In fact C++ is fast, high level, and C compatible,
and is really the ONLY language that actually achieves
the goal -- however it is ugly enough to seriously
challenge the 'high level' attribute :)

Felix actually tries to get both, and without losing
interoperability -- a high level language which
generates fast C compatible code.

The cost is expected to be -- not as fast or high level
as Ocaml -- higher level than C but slower, more
verbose than Python but faster.

The *worst* compromise is Java -- it isn't C compatible,
isn't fast, and isn't high level. Its called throwing
out the baby with the bath water.

> As an example, my OfflineIMAP program is written in Python and uses a 
> configuration file.  Some options in the configuration file actually 
> take snippets of Python code

> I investigated doing this in OCaml, figuring that since there 
> is a toplevel interpreter that can do this stuff, it should be 
> possible.  But there seems to be no way to do it.

Yeah, there is -- see the Dynlink module in the manual
which is fairly well documented. But your program must be bytecode
to use it, and of course you have to ocamlc the configuration
file -- Python does this automatically, in Ocaml you'd have to
do it manually, but it's no big deal.

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: