From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 583A7BBA8 for ; Wed, 20 Jul 2005 08:18:48 +0200 (CEST) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6K6IlZp012039 for ; Wed, 20 Jul 2005 08:18:48 +0200 Received: from [10.0.20.56] (fa-3-0-0.fw.exomi.com [217.169.64.99]) by will.iki.fi (Postfix) with ESMTP id 12929BD; Wed, 20 Jul 2005 09:18:47 +0300 (EEST) Message-ID: <42DDECC6.8010209@exomi.com> Date: Wed, 20 Jul 2005 09:18:46 +0300 From: Ville-Pertti Keinonen User-Agent: Mozilla Thunderbird 1.0.5 (X11/20050717) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Morelli Cc: Kyle Consalus , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Some Clarifications References: <9cc3782b05071411004b27b6a4@mail.gmail.com> <42DB6161.4030507@cs.utah.edu> <42DD5F41.8060801@cs.utah.edu> In-Reply-To: <42DD5F41.8060801@cs.utah.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42DDECC7.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 morelli:01 ocaml:01 ocaml:01 abstraction:01 casts:01 subtyping:01 binary:01 model:01 avoiding:01 mutable:01 erlang:01 real-world:01 threads:01 threads:01 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 Robert Morelli wrote: > In the interests of saving time, and keeping my post to a palatable I'll only comment on a couple of points for the same reason... > just the tip of the iceberg. I find that the facilities of a language > like OCaml are so inadequate to represent this domain, that using > OCaml can be a distinct impediment. Sometimes Java is a better fit. Which do you have more experience in, OCaml or Java? Or FP vs. OO languages in general? Unless you are highly experienced in both, your view of OCaml as an impediment might merely be an indication that you don't know the language and the associated styles of abstraction sufficiently well. Remember, OCaml is a multi-paradigm language, and the paradigms include OO. The reason I'm pointing this out is that there are very few things that Java, as a language, is capable of that don't translate easily to OCaml (type-narrowing casts, explicit - extremely clunky - introspection, neither of which are usually considered good OO practice). OCaml provides a huge amount of things that don't easily translate to Java, even in the OO area (separation of subtyping and inheritance, multiple inheritance, binary methods etc.), and learning to make use of them effectively requires experience. Even for an OO language, Java is horribly clunky and limited. The reasons for its popularity are almost certainly familiarity, library functionality and commercial backing, it can't possibly be the merits of the language itself. > 4. Over the decades, both hardware and software technologies have > inexorably evolved toward networked, decentralized, componentized > systems. Even CPU's are now trending toward multicore designs. This > makes the sequential computational model that FP is based on seem less > and less central. Really? Avoiding mutable state is a good way of making concurrent programming convenient and reliable. See e.g. Erlang for a very much real-world example. Also consider a couple of multi-paradigm (with good FP features) languages with very good support for concurrent and distributed programming - Oz, Alice ML. All of these are capable of running several orders of magnitude more threads than Java efficiently. As is CML, which is the lightest-weight of them all, but also the least practical. Unlike multithreading in mainstream languages, where it's just a bolted-on feature, resulting in extremely heavyweight threads and a default concurrency model of shared-state concurrency (which is the most error-prone) these systems treat concurrency as a programming paradigm. Most of your arguments seem to be centered around either your personal "feeling" of what OO is and what it's capable of (which is why I'm interested in how much experience you have in different kinds of languages) or rationalizations based on a belief in correlation between popularity and merit (obviously popularity will go hand in hand with the availability of literature and tools, but none of those are defining factors in terms of the technical or scientific merit of a paradigm, technology, language or anything else). Note that I'm not arguing against OO, I consider it a very useful programming paradigm, but it is not sufficient and it is vastly over- and misused by the mainstream because they don't know anything else. I consider multi-paradigm languages such as OCaml the most powerful and practical programming tools.