From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA24404; Tue, 15 Oct 2002 12:29:08 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA23976 for caml-list@pauillac.inria.fr; Tue, 15 Oct 2002 12:29:08 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA10291 for ; Tue, 15 Oct 2002 02:14:09 +0200 (MET DST) Received: from mail.interaktif.net.tr ([62.248.102.120]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9F0E7D13063 for ; Tue, 15 Oct 2002 02:14:08 +0200 (MET DST) Received: from abn166-176.ank-avrupa-ports.kablonet.net.tr (unknown [195.174.166.176]) by mail.interaktif.net.tr (Postfix) with ESMTP id 90D071E692 for ; Tue, 15 Oct 2002 03:11:12 +0300 (EEST) From: Eray Ozkural Organization: Bilkent University CS Dept. To: Ocaml Subject: Re: [Caml-list] Re: generic programming Date: Tue, 15 Oct 2002 03:10:25 +0300 User-Agent: KMail/1.4.5 References: <200207030246.WAA28665@dewberry.cc.columbia.edu> <200207032004.QAA07689@dewberry.cc.columbia.edu> <3D235FDE.6080203@baretta.com> In-Reply-To: <3D235FDE.6080203@baretta.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200210150310.25745.erayo@cs.bilkent.edu.tr> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday 03 July 2002 23:34, Alessandro Baretta wrote: > > Templates are "nasty" citizens of the C++ world. I've had > *so* many problems tracking down bugs in code using STL > templates. Basically, the "write once, compile many" > strategy of C++ yields situations where the semantics of the > algorithms coded in a template depends upon the type > parameter you pass to the template itself. Abominable. > > Stick to Caml: "Write Once, Compile Once, Link Many". Compared to Ocaml module system, C++ generics is a weakling. The use of template classes or functions is prohibitive with respect to compilation time, build size and code maintenance. On the other hand, the type system of ocaml combined with functors/structures makes generic programming a dream come true. I cannot think of a code in C++ that can abstract over a particular implementation of, for instance, a Set ADT well enough. Just *try* to write your own alternative set implementation for STL. :) Cheers, -- Eray Ozkural Comp. Sci. Dept., Bilkent University, Ankara www: http://www.cs.bilkent.edu.tr/~erayo GPG public key fingerprint: 360C 852F 88B0 A745 F31B EA0F 7C07 AE16 874D 539C ------------------- 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