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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 C6AF4BB84 for ; Thu, 14 Aug 2008 15:56:44 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AioDAFDWo0jUnw4Romdsb2JhbACCLo9RAQEBAQEBBQcGCRGkBIFV X-IronPort-AV: E=Sophos;i="4.32,210,1217800800"; d="scan'208";a="28220823" Received: from pih-relay04.plus.net ([212.159.14.17]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 14 Aug 2008 15:56:44 +0200 Received: from [90.198.246.64] (helo=beast.local) by pih-relay04.plus.net with esmtpa (Exim) id 1KTdJj-0000aP-1e for caml-list@yquem.inria.fr; Thu, 14 Aug 2008 14:56:43 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Haskell vs OCaml Date: Thu, 14 Aug 2008 14:57:47 +0100 User-Agent: KMail/1.9.9 References: <527cf6bc0808140450w3182b14n60764d3862b9080f@mail.gmail.com> In-Reply-To: <527cf6bc0808140450w3182b14n60764d3862b9080f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808141457.47150.jon@ffconsultancy.com> X-Plusnet-Relay: 4ab5e3ed72717b181745811dbdc5f877 X-Spam: no; 0.00; haskell:01 ocaml:01 ocaml:01 haskell:01 non-trivial:01 vastly:01 monads:01 syntax:01 syntax:01 semantics:01 bytecode:01 compiler:01 haskell's:01 non-trivial:01 stdlib:01 On Thursday 14 August 2008 12:50:43 blue storm wrote: > It is also a good choice to begin with OCaml because everything you learn > with the OCaml basics can be reused for learning Haskell (the converse is > also true, but then you have to learn lazy evaluation first, wich is a > non-trivial shift, and is vastly less used in OCaml). Monads and zippers? > The syntax are different, but not so much (before learning haskell, i could > generally understand the purpose of tiny haskell sources). I have heard > some people say they prefer the Haskell syntax, but this is more a matter > of taste (and not very relevant if you want to learn something from the > language semantics). Both have their ugly sides. That reminds me: you can run the same OCaml code in the top-level, in the bytecode interpreter and through the native code compiler. > Idiomatic OCaml implementations tend to produce more efficient than > Idiomatic Haskell implementations (but Haskell compilers are getting better > and better everyday (for Haskell performances to be good, compilers have to > do lots of clever and not so simple optimizations), Even if Haskell's performance is improved it will remain unpredictable and, consequently, it will continue to be impossible to optimize non-trivial Haskell programs. > and Haskell is faster than most (scripting) languages used these days > anyway). Despite being written in Python, Mercurial is orders of magnitude faster than Darcs. > The Haskell standard library is bigger than the Ocaml one, Does the Haskell stdlib provide a database interface, md5 checksums, marshalling, pretty printing, lexer generator, graphics library, regular expressions, unix interface and weak references? > Haskell program thus tends to > be more terse and "higher-level" (because of reusing a lot of higher-order > combinators in the stdlib): OCaml is also very expressive, but the > simplicity of the stdlib tends to keep people on simpler things. I'm not sure what you mean by "simplicity of the [OCaml] stdlib tends to keep people on simpler things" but there is certainly far more non-trivial software written in OCaml than Haskell, both open source and commercial. > Camlp4 is a flexible and powerful Ocaml preprocessor... And an extensible general-purpose parser generator that is higher-level than Parsec. Camlp4 rocks! -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e