Version franēaise
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Functors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Julien Signoles <Julien.Signoles@l...>
Subject: Re: [Caml-list] Functors

> In any case, the absence of a defunctorization step means that we often
> have a choice between performance and a functorized programming style, which
> stinks.

I don't think you have a stinking choice. My opinion is: always choose a
functorized programming style and, if this style significantly reduces
performance, then use a defunctorizer like ocamldefun. For example, see
the Jean-Christophe Filliātre's contribution to this thread
(http://caml.inria.fr/archives/200405/msg00087.html). First, he
implements an algorithm in a functorized style. Then, he sadly remarks
poor performance due to functors. Finally, he defunctorizes and boosts
the performance.

> Does ocamldefun deal with the recursive modules of 3.07?

The current version (v1.11) of ocamldefun only works with ocaml 3.06 and
so it doesn't deal with recursive modules. A version of ocamldefun dealing
with ocaml 3.07 is on my TODO list.

> MLton began as an SML defunctorizer if I'm not mistaken, but has evolved
> into a whole program optimizing compiler.

You're not mistaken :-). See http://www.mlton.org/history.html.

Cheers,
Julien
-- 
mailto:Julien.Signoles@lri.fr ; http://www.lri.fr/~signoles
"In theory, practice and theory are the same,
but in practice they are different" (Larry McVoy)

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