caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Don Syme" <dsyme@microsoft.com>
To: "Alain Frisch" <frisch@clipper.ens.fr>,
	"John R Harrison" <johnh@ichips.intel.com>
Cc: <caml-list@inria.fr>
Subject: RE: [Caml-list] User-defined equality on types?
Date: Thu, 19 Apr 2001 14:00:59 -0700	[thread overview]
Message-ID: <0C682B70CE37BC4EADED9D375809768A02DB1F0F@red-msg-04.redmond.corp.microsoft.com> (raw)

> 
> On Wed, 18 Apr 2001, John R Harrison wrote:
> 
> > I'd like to suggest allowing the user to define a chosen 
> interpretation
> > of the equality symbol, and perhaps the polymorphic 
> orderings too, on
> > each new (maybe just abstract) data type. This seems natural in the 
> > context of abstract data types with non-canonical 
> representation, giving
> > a kind of quotient type. 
> [snip]
> > Any opinions?
> 
> I support this suggestion. The standard equality/ordering/hashing
> functions are often adequate for most of the data structures, 
> and it would
> be useful to use them and just place a hook on specific types 
> to provide
> specialized implementation. It could almost be done with
> the "custom" block tag; the problem is that such blocks are 
> not garbage
> collected.  What about "custom Caml blocks" ?

I support the suggestion too.  In general I'm not a big fan of types
carrying much implicit functionality, but I like the "balance" that Caml
has struck by making hashing, equality, ordering and marshalling
available for all types.  And given that you can define these functions
for custom blocks, it cetainly makes sense to be able to define them for
types defined in Caml as well...

Cheers,
Don
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


             reply	other threads:[~2001-04-19 21:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-19 21:00 Don Syme [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-04-18 19:42 John R Harrison
2001-04-19 17:44 ` Francisco Valverde Albacete
2001-04-19 23:25   ` John R Harrison
2001-04-19 19:57 ` Alain Frisch
2001-04-23  8:54 ` Xavier Leroy
2001-04-23 16:42   ` Brian Rogoff
2001-04-24  8:33     ` Andreas Rossberg

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=0C682B70CE37BC4EADED9D375809768A02DB1F0F@red-msg-04.redmond.corp.microsoft.com \
    --to=dsyme@microsoft.com \
    --cc=caml-list@inria.fr \
    --cc=frisch@clipper.ens.fr \
    --cc=johnh@ichips.intel.com \
    /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).