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 CAA04378; Tue, 6 Aug 2002 02:49:26 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 CAA04389 for ; Tue, 6 Aug 2002 02:49:25 +0200 (MET DST) Received: from wetware.wetware.com (wetware.wetware.com [199.108.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g760nOP24042 for ; Tue, 6 Aug 2002 02:49:24 +0200 (MET DST) Received: from kallisti.local.(ra02.wetware.com[199.108.16.82]) (1863 bytes) by wetware.wetware.com via sendmail with P:esmtp/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) id for ; Mon, 5 Aug 2002 17:49:22 -0700 (PDT) (Smail-3.2.0.114 2001-Aug-6 #1 built 2002-Aug-4) Date: Mon, 5 Aug 2002 17:49:21 -0700 Subject: Re: [Caml-list] ocaml-classes-3.05 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v543) Cc: oleg_inconnu@myrealbox.com, caml-list@inria.fr To: Jacques Garrigue From: james woodyatt In-Reply-To: <20020806091344X.garrigue@kurims.kyoto-u.ac.jp> Message-Id: <5858A222-A8D6-11D6-A84E-000502DB38F5@wetware.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.543) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Monday, Aug 5, 2002, at 17:13 US/Pacific, Jacques Garrigue wrote: > From: Oleg >> >> Jacques, what are the advantages of using the OO wrappers over the >> corresponding modules from the standard distribution? > > None. > You don't get more features. Actually... not true. You get the ability to override the methods by inheritance. In exchange for this feature, you pay a not insignificant cost in initialization time and program codespace. Whether this trade is a good one is open to interpretation. > But it felt strange at the beginning to have an OO languages with no > basic classes. So I quickly wrote those, and apparently some people > are using them. They may like the oo syntax, or the customizability. It felt strange to me at first too. The feeling eventually passed when I fully understood what is really easier to do with classes and class types than with modules, signatures and functors. My advice: Use the most basic syntax the language provides to do the basics. Use objects and methods only when functions (including higher-order functions) are insufficient. --james ------------------- 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