From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 71D1DBCAE for ; Tue, 19 Jul 2005 00:17:15 +0200 (CEST) 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 j6IMHEZ8004965 for ; Tue, 19 Jul 2005 00:17:14 +0200 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 AAA05377 for ; Tue, 19 Jul 2005 00:17:14 +0200 (MET DST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.85]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6IMHCQW004960 for ; Tue, 19 Jul 2005 00:17:13 +0200 Received: from mac.com (smtpin02-en2 [10.13.10.147]) by smtpout.mac.com (Xserve/8.12.11/smtpout03/MantshX 4.0) with ESMTP id j6IMH8OC025398; Mon, 18 Jul 2005 15:17:08 -0700 (PDT) Received: from [192.168.0.100] (dsl092-032-215.lax1.dsl.speakeasy.net [66.92.32.215]) (authenticated bits=0) by mac.com (Xserve/smtpin02/MantshX 4.0) with ESMTP id j6IMH4W4028306 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Mon, 18 Jul 2005 15:17:07 -0700 (PDT) In-Reply-To: <1121722053.6774.93.camel@localhost.localdomain> References: <9cc3782b05071411004b27b6a4@mail.gmail.com> <42DB6161.4030507@cs.utah.edu> <42DB74DC.8030201@barettadeit.com> <42DBF1C6.7080005@cs.utah.edu> <1121722053.6774.93.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <02791497-749C-4944-BC41-B92454C4ABFD@mac.com> Cc: Robert Morelli , Alex Baretta , Ocaml Content-Transfer-Encoding: 7bit From: Paul Snively Subject: Re: [Caml-list] (Mostly) Functional Design? Date: Mon, 18 Jul 2005 15:16:52 -0700 To: skaller X-Pgp-Agent: GPGMail 1.1.1 (Tiger) X-Mailer: Apple Mail (2.733) X-Miltered: at nez-perce with ID 42DC2A6A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42DC2A68.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 hash:01 morelli:01 ocaml:01 replacing:01 syntax:01 o'caml:01 semantics:01 o'caml:01 o'caml's:01 polymorphism:01 productive:01 encouraging:01 o'caml's:01 toplevel:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jul 18, 2005, at 2:27 PM, skaller wrote: > On Mon, 2005-07-18 at 12:15 -0600, Robert Morelli wrote: > > >> With all due respect, claims of order of magnitude productivity >> gains, that OCaml is a far better language than Java, etc. are >> exactly the kind of advocacy that I think is counterproductive. >> Most programmers would regard such dramatic statements as >> implausible, >> if not preposterous. >> > > Yes they would .. until they tried it. > I'm going to allow myself to be guilty of exactly what I deplored about the original e-mail, namely offering personal opinions and anecdotes without citations or sources of any kind. :-) Although I had the great good fortune to learn Scheme as my third language after BASIC and Z-80 assembly language and to attend Indiana University and hobknob with the likes of Dan Friedman and Douglas Hofstadter, by far the majority of my for-pay programming work has been in 680x0 assembly language, C, C++, and Java. I've been doing this for about 25 years now. I supported Macintosh developers in the transition from Object Pascal to C++ in the MacApp 3.0 timeframe, roughly 1989-1991, provided background research for a presentation that Larry Tesler gave about Apple's approach to supporting dynamic linking of C++, and unofficially supported Macintosh Common Lisp, which at the time was owned by Apple. More recently, I spent essentially the entirety of the dot-com years working with Java, doing everything from what, as far as I know, was the first applet used in a movie promotional site (for one of Peter Jackson's earlier films, "The Frighteners") to replacing the back-end infrastructure for a large multimedia/social site (iFilm.com). I currently develop C+ + for a combined Linux server/set-top box conditional access system for the cable/satellite industry. I found Objective Caml in a rather roundabout way: I first started paying attention to distributed programming and data replication issues while at Apple, as part of an effort to reduce the tendency that any large organization has to construct numerous "data silos," the left hand not knowing what the right hand is doing. As this was about 1990, my investigations led me to Ken Birman's work on the Horus project at Cornell. While we never did anything with Horus, I continued to pay some attention to it, off and on, over the years. Fast forward about a decade, and I was thinking about distributed programming again, in the context of the game industry (I've had a couple of game programming jobs before). By this time, Birman's group had moved on to create the Ensemble system, which was written in Objective Caml. I'd never really cottoned to the ML family before, finding the syntax to be too unlike Pascal or C and not being able to really see the benefit over, say, Common Lisp or Scheme. O'Caml seemed a bit different: it was object-oriented as well as functional, was apparently reasonably fast, and the Ensemble team seemed to put great stock in being able to prove certain tricky bits of their system correct by virtue of having access to a formal semantics for the parts of O'Caml that they used. This made for an intriguing combination, with Ensemble as a compelling proof-by-demonstration. Fast forward again, because I'm still doing this on my own free time, but I have enough experience now to suggest that John is correct: the ML family in general, but O'Caml in particular, provides extreme productivity benefits over the currently popular languages. I find it to be on a par with Common Lisp in expressive power, and in fact I find the factors in Common Lisp and O'Caml's productivity enhancement to be roughly similar: * Both are functional, in the sense of supporting the use of higher- order functions * Both are imperative. Sometimes the judicious use of state is the most efficient, along a number of dimensions, approach to solving your problem * Both are object-oriented. Sometimes the judicious use of inclusion polymorphism, etc. * Both are geared towards programming-in-the-large: package/module systems, documentation-construction tools, sophisticated steppers/ debuggers/inspectors, etc. make structuring systems easier * Both recognize that a software development ecosystem needs more than just a core language: reasonably comprehensive libraries are also important and here's what I think of as the kicker, the above being necessary, but not sufficient, properties of a productive development environment: * Both are interactive, encouraging a playful, exploratory, discovery- oriented programming style. I can't emphasize enough how crucial O'Caml's provision of a toplevel, bytecode compiler, and native compiler are. There is no substitute for being able to type in some code and see what happens without a whole edit/compile/link/test/crash/debug cycle. Of course, it's also important to be able to commit to an implementation and have it perform acceptably. Modern Lisps and O'Caml have these bases covered. You can get close-ish with a good Standard ML, but there's no one system that ties it all together like O'Caml does (you have to, e.g. mix and match something like Moscow ML with something like MLton to get both the interactivity and the final performance out of Standard ML). This is the key. The Lisps and O'Caml let me have a thought and be playing with that thought instantly; they don't yank me out of the thought while I'm waiting for my compiler/linker, either the first time, or whenever I make a mistake. I don't know how to put this any better: as a programmer, I get into a rather fluid state of analysis/synthesis with respect to my problem domain. Lisp and O'Caml sustain that fluid state; virtually all other language environments shatter it. And yes, the difference, in my experience, is roughly an order of magnitude in productivity. But because this productivity comes from sustaining this fluid analytical/synthetic process, it can't be described in any meaningful way; it can only be experienced, and this is a real burden to impose upon those who are quite rightly skeptical about such claims, which is why, apart from this e-mail, I don't generally bother trying; I limit my advocacy to saying "Why not take O'Caml for a spin some weekend? What have you got to lose?" > -- > John Skaller > > Best regards, Paul Snively -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iEYEARECAAYFAkLcKl4ACgkQO3fYpochAqLIywCfcvn6l/UrazIK3d7Wxm9RTt0T qmwAoNADqJErYWaC3m3oxUx0ZxOlWciX =rkZl -----END PGP SIGNATURE-----