Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Haskell vs OCaml
Date: Thu, 14 Aug 2008 14:57:47 +0100	[thread overview]
Message-ID: <200808141457.47150.jon@ffconsultancy.com> (raw)
In-Reply-To: <527cf6bc0808140450w3182b14n60764d3862b9080f@mail.gmail.com>

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


  parent reply	other threads:[~2008-08-14 13:56 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13 12:48 circ ular
2008-08-13 13:27 ` [Caml-list] " Brian Hurt
2008-08-14  0:09 ` Jon Harrop
2008-08-14  2:46   ` David Thomas
2008-08-14  2:52     ` Erik de Castro Lopo
2008-08-14 10:37       ` Paolo Donadeo
2008-08-14 12:17     ` Jon Harrop
2008-08-14 16:44       ` Erik de Castro Lopo
2008-08-14 11:50 ` blue storm
2008-08-14 12:47   ` David Mitchell
2008-08-14 13:28   ` Peng Zang
2008-08-14 14:01     ` Peng Zang
2008-08-15  2:09       ` blue storm
2008-08-14 13:57   ` Jon Harrop [this message]
2008-08-14 14:06     ` Peng Zang
2008-08-14 14:21     ` Vincent Hanquez
2008-08-14 14:44       ` Jon Harrop
2008-08-14 20:57     ` Nicolas Pouillard
2008-08-14 21:16       ` Jon Harrop
2008-08-14 21:50         ` Nicolas Pouillard
2008-08-15  0:15           ` Jon Harrop
2008-08-15  1:14             ` Stéphane Glondu
2008-08-17  1:00             ` Luca Saiu
2008-08-19  2:40             ` Paul Snively
2008-08-20 11:33 ` Dr. Thomas Fischbacher
2008-08-21  8:47   ` DooMeeR
2008-08-21 10:59     ` David Teller
2008-08-21 13:52     ` Dr. Thomas Fischbacher
2008-08-14 13:26 Damien Guichard
     [not found] <fa.e3jKyg6bl9+vTkPgypQ4ZRzEoos@ifi.uio.no>
2013-03-18  9:08 ` adrian.alexander.may
2013-03-18  9:48   ` Malcolm Matalka
2013-03-18  9:59     ` Gabriel Scherer
2013-03-18 11:05       ` Adrian May
2013-03-18 11:26     ` Kakadu
2013-03-19  1:23       ` Francois Berenger
2013-03-26 10:36         ` Nicolas Braud-Santoni
2013-03-26  0:49   ` Kristopher Micinski
2013-03-26  2:37     ` Erik de Castro Lopo
2013-03-26  2:57       ` Kristopher Micinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200808141457.47150.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox