From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 77542BBC4 for ; Wed, 4 Mar 2009 04:13:34 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmYBAMeArUlCbwQZk2dsb2JhbACVBwEBAQEJCQoJEQTAcoQIBg X-IronPort-AV: E=Sophos;i="4.38,298,1233529200"; d="scan'208";a="23821200" Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Mar 2009 04:13:33 +0100 Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id DA53E2D542C; Tue, 3 Mar 2009 22:13:32 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 03 Mar 2009 22:13:32 -0500 X-Sasl-enc: Xg76S9vAXBZo9G+2TNKJ0N6Qt461998aKAxP28hxJukB 1236136412 Received: from [192.168.1.10] (ALyon-157-1-28-106.w86-193.abo.wanadoo.fr [86.193.119.106]) by mail.messagingengine.com (Postfix) with ESMTPSA id 1A01C2CCCF; Tue, 3 Mar 2009 22:13:31 -0500 (EST) Message-ID: <49ADF140.8070409@ens-lyon.org> Date: Wed, 04 Mar 2009 04:10:56 +0100 From: Martin Jambon User-Agent: Thunderbird 2.0.0.17 (X11/20081008) MIME-Version: 1.0 To: Brian Hurt Cc: Jon Harrop , caml-list@yquem.inria.fr Subject: Re: [Caml-list] stl? References: <91a2ba3e0903031340wcdc976cp52522eb35f7ccb73@mail.gmail.com> <200903032342.39527.jon@ffconsultancy.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ens-lyon:01 stl:01 functors:01 ocaml:01 functors:01 ocaml:01 brutality:01 wrote:01 wrote:01 caml-list:01 precisely:01 strings:01 jambon:01 jambon:01 algorithm:01 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 strings. Martin -- http://mjambon.com/