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 UAA11010; Wed, 22 Sep 2004 20:29:07 +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 UAA10377 for ; Wed, 22 Sep 2004 20:29:05 +0200 (MET DST) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i8MIT3bW019333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 22 Sep 2004 20:29:05 +0200 Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.13.1/8.12.11) with ESMTP id i8MISugX017963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Sep 2004 13:28:59 -0500 (CDT) Date: Wed, 22 Sep 2004 13:39:16 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Richard Jones cc: caml-list Subject: Re: [Caml-list] Re: OCAML Downcasting? In-Reply-To: <20040922102959.GA21645@annexia.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 4151C46F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 downcasting:01 monolithic:01 reuse:01 reuse:01 functors:01 wrench:01 ocaml:01 ocaml:01 sep:01 binary:02 modules:02 objects:02 classes:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 22 Sep 2004, Richard Jones wrote: > But the OCaml assumption here is that you program is one big > monolithic entity, for which you have source (and are recompiling) all > parts. This goes against the OO theory of "reuse" - particularly of > reuse of binary classes, which I don't think I've ever actually used > in practice anyway. Note that OO resuse is not the only theory of reuse possible. Partial function application, higher order functions, modules and functors, universal types ('a), etc. also allow incredible code reuse, without touching objects. In OO program, the object or class is the building block of reuse- in functional programming, it's the function. If all you know is hammers, a cresent wrench is seen as a badly designed hammer. -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian ------------------- 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