caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: brogoff <brogoff@speakeasy.net>
To: skaller <skaller@users.sourceforge.net>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] pattern match on class?
Date: Thu, 24 Nov 2005 22:13:41 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0511242205330.23546@shell2.speakeasy.net> (raw)
In-Reply-To: <1132775561.25948.20.camel@rosella>

On Thu, 24 Nov 2005, skaller wrote:
> We have anonymous objects now .. but can one pattern
> match on a class as one can on a record?

No. But pattern matching is the enemy of data abstraction, and
we did get private row types, which allow polymorphic variants
and classes to play a bit more nicely with OCaml's data abstraction
facilities.

I'm not sure why you thought that there was a relationship between
anonymous objects and pattern matching. The question which pops into
my mind is, "Now that we have anonymous objects, when will we have
delegation?" but even more than that I wonder about the many other
features that have been discussed that could be used in place of
objects and classes.

-- Brian


  reply	other threads:[~2005-11-25  6:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23 19:52 skaller
2005-11-25  6:13 ` brogoff [this message]
2005-11-25  5:31 [Caml-list] " Keiko Nakata

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.0511242205330.23546@shell2.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=skaller@users.sourceforge.net \
    /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).