From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C8ABEBB81 for ; Fri, 2 Dec 2005 01:58:50 +0100 (CET) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jB20womT021432 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 2 Dec 2005 01:58:50 +0100 Received: from [80.229.56.224] (helo=chetara) by pih-relay04.plus.net with esmtp (Exim) id 1EhzG9-0002dv-Pc for caml-list@yquem.inria.fr; Fri, 02 Dec 2005 00:58:45 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Multi-Index Container Date: Fri, 2 Dec 2005 00:53:29 +0000 User-Agent: KMail/1.8.2 References: <2670dfc80512011442g560dbfd0nabdef7c65d26d04c@mail.gmail.com> In-Reply-To: <2670dfc80512011442g560dbfd0nabdef7c65d26d04c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512020053.30014.jon@ffconsultancy.com> X-Miltered: at concorde with ID 438F9C4A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 debugger:01 stl:01 libs:01 trivial:01 frog:98 wrote:01 expressive:01 expressive:01 caml:02 paradigms:02 objective:02 languages:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Thursday 01 December 2005 22:42, Mako Tagliere wrote: > My colleagues and I often debate the relative merits of OCaml and C++. > After I tell them how expressive, fast, and all-around nifty OCaml is > ("see! the debugger works backwards in time!"), they reply "yeah but > C++ has STL and Boost library, which make C++ every bit as expressive as > OCaml." When we repeated this debate recently, they challenged me to > show them an implementation of Boost's multi-index container > (http://www.boost.org/libs/multi_index/doc/index.html) in OCaml. A > bit of searching did not reveal an existing OCaml implementation. > > Would someone in the OCaml community be willing to sketch out such an > implementation? In order to compare different languages meaningfully, you should try to solve problems by writing independent implementations in different languages. There is no point in trying to mimic individual features, paradigms or styles found in other languages, as you suggest. Paul Graham's infamous "accumulator generator" challenge is a fine example this mistake: http://www.paulgraham.com/accgen.html So you should ask your friends to try to come up with a real task with a C++ implementation that benefits from Boost's functionality, and then write your own implementation in OCaml before comparing the two. I thought the examples from the page that you cite might have been suitable but the ones that I have looked at are all trivial in OCaml (and C++). -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists