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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8C67BBB9A for ; Tue, 8 Nov 2005 03:11:43 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA82BgbF003942 for ; Tue, 8 Nov 2005 03:11:43 +0100 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 DAA23982 for ; Tue, 8 Nov 2005 03:11:42 +0100 (MET) Received: from cenn.mc.mpls.visi.com (cenn.mc.mpls.visi.com [208.42.156.9]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA82Bf9u003939 for ; Tue, 8 Nov 2005 03:11:42 +0100 Received: from [192.168.42.2] (bhurt.dsl.visi.com [208.42.141.66]) by cenn.mc.mpls.visi.com (Postfix) with ESMTP id 75BF381E7; Mon, 7 Nov 2005 20:11:37 -0600 (CST) Date: Mon, 7 Nov 2005 20:15:31 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: skaller Cc: Florian Weimer , caml-list Subject: Re: Ant: [Caml-list] The "Objective" part of Objective Caml In-Reply-To: <1131414473.23991.37.camel@rosella> Message-ID: References: <20051107214110.46596.qmail@web26805.mail.ukl.yahoo.com> <87acggxguw.fsf@mid.deneb.enyo.de> <1131414473.23991.37.camel@rosella> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at nez-perce with ID 4370095E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4370095D.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 2005,:98 wrote:01 typing:01 typing:01 functions:01 modules:01 patterns:02 caml:02 objective:02 objective:02 objects:02 objects:02 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 Tue, 8 Nov 2005, skaller wrote: >>> The object oriented part of OCaml is roughly speaking >>> just as capable as that of Python, C++, Java, C# etc. >> >> Sure, I don't doubt that. > > I do. The Python system is much more 'capable' and much less 'robust'. > This is typical for dynamic typing vs static typing. I think I'm with Skaller here- Objects in Ocaml are much less powerfull than they are in (for example) Java or Python. For example, objects in Ocaml can not have non-virtual (non-overloadable) methods, or static (global) methods. So patterns like singletons are hard to implement with Ocaml objects. But that's OK- because Ocaml provides other ways to provide those capabilities. The problem I have with a lot of pure-OO languages is the need to make objects do everything. The proper way to do a singleton in Ocaml is to use modules, not objects. If you're not using the true power of objects- inheritance, virtual functions, and overloading- you shouldn't be using objects. So the fact that Ocaml doesn't provide support for these non-objects isn't a problem. Brian