caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Duplicate functionality?
Date: Sat, 22 Oct 2005 04:31:17 +0100	[thread overview]
Message-ID: <200510220431.18749.jon@ffconsultancy.com> (raw)
In-Reply-To: <0IOQ006I7LO24OK2@vms044.mailsrvcs.net>

On Saturday 22 October 2005 02:04, Stephen Brackin wrote:
> My biggest initial question is why OCaml has both a modules system and
> objects: Aren't they different ways of accomplishing the same things?

Both modules and objects allow you to encapsulate related definitions, yes.

However, modules are much more static by nature and objects are much more 
dynamic, i.e. you get stronger static checking using modules than you do 
using objects, giving more comprehensible error messages and more robust and 
faster code.

Consequently, OCaml programmers tend to prefer modules over objects where 
possible.

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists


  reply	other threads:[~2005-10-22  3:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-22  1:04 Stephen Brackin
2005-10-22  3:31 ` Jon Harrop [this message]
2005-10-22  5:57   ` [Caml-list] " Matt Gushee
2005-10-22  8:47   ` Gerd Stolpmann
2005-10-22  5:49 ` Jacques Garrigue
2005-10-22 10:07   ` Lauri Alanko
2005-10-22 21:12 ` Brian Hurt
2005-10-24  3:14 ` Ant: " Martin Chabr
2005-10-25 16:25   ` Didier Remy

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=200510220431.18749.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;
as well as URLs for NNTP newsgroup(s).