From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B1995BBCA for ; Fri, 9 May 2008 09:56:47 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj0BALSgI0jCpx6wlWdsb2JhbACSBgEBAQEJBQYamQk X-IronPort-AV: E=Sophos;i="4.27,459,1204498800"; d="scan'208";a="25988885" Received: from smtpmin.univ-orleans.fr (HELO min.univ-orleans.fr) ([194.167.30.176]) by mail4-smtp-sop.national.inria.fr with ESMTP; 09 May 2008 09:56:47 +0200 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id D8CCE12B416; Fri, 9 May 2008 09:56:46 +0200 (CEST) Received: from [192.168.0.12] (ras75-4-82-235-58-110.fbx.proxad.net [82.235.58.110]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 7AEB736E5B; Fri, 9 May 2008 09:56:46 +0200 (CEST) Subject: Re: [Caml-list] Re: Why OCaml rocks From: David Teller To: Jon Harrop Cc: caml-list@yquem.inria.fr In-Reply-To: <200805090139.54870.jon@ffconsultancy.com> References: <200805090139.54870.jon@ffconsultancy.com> Content-Type: text/plain Date: Fri, 09 May 2008 09:58:26 +0200 Message-Id: <1210319906.6399.12.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 univ-orleans:01 0100,:01 parallelism:01 printf:01 printf:01 ocaml:01 haskell:01 haskell:01 camomile:01 syntax:01 syntax:01 shift-reduce:01 ocaml's:01 shift-reduce:01 On Fri, 2008-05-09 at 01:39 +0100, Jon Harrop wrote: > 1. Lack of Parallelism: Yes, this is already a complete show stopper. Agreed. > 2. Printf: I think > printf is one of the reasons OCaml dominates over languages like Haskell and > SML. I'm not sure about "dominate", but yes, it's definitely one reason why I code in OCaml rather than Haskell. > 5. Strings: pushing unicode throughout a general purpose language is a > mistake, IMHO. This is why languages like Java and C# are so slow. We have a good Unicode library (see Camomile), good ropes libraries (see Community Caml) and someone is bound to write a syntax extension to provide a natural syntax for Rope literal constants. > 6. Shift-reduce conflicts: although there as aspects of OCaml's syntax that I > would like to tweak (e.g. adding an optional "end" after a "match" > or "function" to make them easier to nest), I am not bother about the > shift-reduce conflicts. Mainstream languages get by with far more serious > syntactic issues (like <<...>> in C++). That's something we may need to discuss at some point. I would really like the ability to write match a with ( | bla | bla | bla ) > 7. Not_found: I like this, and Exit and Invalid_argument. Brian's point that > the name of this exception does not convey its source is fallacious: that's > what exception traces are for. I personally prefer ExtLib's approach of redefining exceptions per-module. > 8. Exceptions: I love OCaml's extremely fast exception handling (6x faster > than C++, 30x faster than Java and 600x faster than C#/F#!). Yep. > 9. Deforestation: Brian says "Haskell has introduced a very interesting and > (to my knowledge) unique layer of optimization, called deforrestation". True, > of course, but useless theoretical piffle because we know that Haskell is > slow in practice and prohibitively difficult to optimize to-boot. Deforesting > is really easy to do by hand. Are you sure or is that just a troll ? Supero seems to improve enormously Haskell's performances and the Shootout already shows Haskell beating OCaml in several tests. > 10. Limited standard library: I agree but this is only an issue because we are > not able to fix the problem by contributing to the OCaml distribution. That's the whole idea of Community Caml / Batteries Included. Really, feel free to contribute. > . Pattern matching over lazy values. Have you looked at the Patterns project on Google ? It provides pattern-matching over lazy values. I've used it in conjunction with my own lazy list module [1] to port Graham Hutton's Countdown problem from Haskell, and it works. > I believe these can be fixed by creating a new open source functional language > for Linux based upon LLVM. However, the lack of a suitable GC is a complete > show stopper. The JVM is the only thing that comes close and it is unable to > support tail calls without a catastrophic performance cost, i.e. so bad that > you might as well write an interpreter. Why a full new language ? I may understand the interest of writing a new compiler for OCaml (or whichever other language) and gradually improving the forked compiler, but that's a different story altogether. Cheers, David [1] https://forge.ocamlcore.org/frs/shownotes.php?release_id=12 -- David Teller Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.