caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: brogoff <brogoff@speakeasy.net>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Instruction selection in the OCaml compiler: Modules or	classes?
Date: Fri, 23 Feb 2007 08:13:29 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0702230756410.11798@shell4.speakeasy.net> (raw)
In-Reply-To: <6CB0D237-F894-4AC3-BDBE-2BB484928D3C@gmail.com>

On Thu, 22 Feb 2007, Joel Reymont wrote:
> The slides seem to favor the class-based solution but then I hear
> that classes in OCaml are slow and people like Markus Mottl just
> plain despise them :-). What does everyone else opine?

It's one of the most interesting issues in the OCaml language design.

There is a lot of overlap between the module system, the object system,
and to some degree, records. One would think that a language design with
fewer features could provide the same powers of parameterization, but
modules aren't first class (and the recursive module extension is still
an "experimental" feature) and don't support inheritance, records in
OCaml are rather weak, and classes don't have type components.

I use classes less frequently (but as Markus points out they are for the
most part much more pleasant than Java or C++ classes) so my gut feeling
is that their abilities should be subsumed in the module system (mixin
modules?) and the record system. But that will probably be a new
language, ML2040, given the current rate of change of ML :-(.

-- Brian


  parent reply	other threads:[~2007-02-23 16:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 14:38 Joel Reymont
2007-02-22 17:21 ` [Caml-list] " Tom
2007-02-22 17:38 ` Xavier Leroy
2007-02-22 19:55 ` Chris King
2007-02-22 19:59 ` Markus Mottl
2007-02-23 16:13 ` brogoff [this message]
2007-02-23 18:14   ` Tom
2007-02-23 19:28     ` [Caml-list] Instruction selection in the OCaml compiler: Modulesor classes? Andreas Rossberg
2007-02-24  2:51       ` skaller
2007-02-24 11:48         ` David Baelde
     [not found]           ` <4a708d20702240518l2c430b06r18fe64cabe5cbe9@mail.gmail.com>
2007-02-24 13:33             ` Lukasz Stafiniak
2007-02-24 14:58         ` [Caml-list] Instruction selection in the OCaml compiler:Modulesor classes? Andreas Rossberg
2007-02-24 17:39           ` skaller

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=Pine.LNX.4.58.0702230756410.11798@shell4.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=caml-list@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).