English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-04 (03:13)
From: Martin Jambon <martin.jambon@e...>
Subject: Re: [Caml-list] stl?
Brian Hurt wrote:
> On Tue, 3 Mar 2009, Jon Harrop wrote:
>> Functors give
>> you the same capability in OCaml but they are rarely used precisely
>> because
>> the functionality is not very useful.
> I think I disagree with this.  I think functors aren't used very much in
> Ocaml because:
> 1) They're a big, scary name, and
> 2) They're slightly less efficient.

Functors are not used very much because they are not needed very often. OCaml
is a free market.

All sorts of reusable algorithms on arbitrary data can be nicely implemented
using functors, without more difficulty than the specialized versions of the
same algorithm. But do you often implement cool algorithms that work on
arbitrary types? Not me. Certainly less than 5% of the time. Most of the time
we have to deal with the brutality of the real world, which is all bytes and