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 PAA29192; Sun, 7 Dec 2003 15:12:24 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA28822 for ; Sun, 7 Dec 2003 15:12:22 +0100 (MET) Received: from smtp.siren.ocn.ne.jp (siren.ocn.ne.jp [211.129.13.170]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hB7ECLr19309 for ; Sun, 7 Dec 2003 15:12:21 +0100 (MET) Received: from PWARP (p2166-ipad08kyoto.kyoto.ocn.ne.jp [221.189.199.166]) by smtp.siren.ocn.ne.jp (Postfix) with SMTP id 2FCBE194F; Sun, 7 Dec 2003 23:12:19 +0900 (JST) Message-ID: <002201c3bccc$1e126c60$0274a8c0@PWARP> From: "Nicolas Cannasse" To: "Benjamin Geer" Cc: References: <871xrhe4hb.fsf@iki.fi> <002201c3bc6e$195e49e0$0274a8c0@PWARP> <3FD30D59.2000706@socialtools.net> Subject: Re: [Caml-list] Object-oriented access bottleneck Date: Sun, 7 Dec 2003 23:12:15 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 bottleneck:01 cannasse:01 inlining:01 closures:01 closures:01 runtime:01 subclassing:01 nicolas:01 nicolas:01 mutable:01 closure:01 modules:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Nicolas Cannasse wrote: > > For most of the cases, modules should be powerful enough and offer far > > better performances... and inlining. > > Even if you need some specialisation, you can always handle it using a > > closure. > > Could you give an example? > > Ben > For example, you have a module A with a type t which have one or more mutable fields where you can store user given closures that will perform some specific tasks. Theses closures can be seen has type "methods" , and if the type is visible, you can even do some runtime subclassing. Nicolas Cannasse ------------------- 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