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] Functors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-06 (12:32)
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
( 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

-- ;
"In theory, practice and theory are the same,
but in practice they are different" (Larry McVoy)

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