caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: brogoff <brogoff@speakeasy.net>
To: Christophe TROESTLER <debian00@tiscali.be>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Type abstraction and (polymorphic) equality
Date: Wed, 29 Jun 2005 16:39:19 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0506291534420.9466@shell1.sea5.speakeasy.net> (raw)
In-Reply-To: <20050629.153210.99062320.debian00@tiscali.be>

On Wed, 29 Jun 2005, Christophe TROESTLER wrote:
> Well I was more thinking of overloading equality in a GCaml manner
> (http://www.yl.is.s.u-tokyo.ac.jp/~furuse/gcaml/) which offers you
> more, not less.

That's one way to go about it, though GCaml still provides polymorphic
equality, so if you write your generic function so that there's a
catch all 'a-> 'a -> bool branch which uses that equality, the bug/flaw can
still bite you.

It would be best if GCaml (and OCaml?) do away with polymorphic equality, or
at least give it some ugly name to prevent it's accidental misuse.

Type classes would be another option, but people don't like the redundancy with
the ML module system. Maybe some future ML will be based on type classes and
a simple non-parameterized module system, so

  However, I do not know how much GCaml actually tries
> to reduce the performance hit by compiling monomorphically whenever
> possible...

There's not even a native code compiler yet, so I wouldn't worry to much about
it just now.

-- Brian


  reply	other threads:[~2005-06-29 23:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-29  0:31 Christophe TROESTLER
2005-06-29  9:12 ` [Caml-list] " Jon Harrop
2005-06-29 10:06   ` Andreas Rossberg
2005-06-29 13:32   ` Christophe TROESTLER
2005-06-29 23:39     ` brogoff [this message]
2005-06-30  7:46       ` Christophe Raffalli
2005-06-29 20:27   ` Christophe TROESTLER
2005-06-29 20:37   ` John Skaller
2005-06-30  9:53     ` Andreas Rossberg
2005-06-30 17:08       ` brogoff
2005-06-30 17:22         ` Andreas Rossberg
2005-06-30 19:56       ` John Skaller
2005-07-01 12:49         ` Andreas Rossberg
2005-06-29  9:45 ` Jean-Christophe Filliatre
2005-06-29 17:33 ` William Lovas
2005-06-29 18:08 ` sejourne_kevin
2005-06-30  9:51   ` Andreas Rossberg
2005-06-30 19:54     ` John Skaller
2005-06-30 22:24       ` Alain Frisch
2005-06-30 12:19 ` Alain Frisch
2005-06-30 12:32   ` padiolea
2005-06-30 12:57     ` Alain Frisch

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.0506291534420.9466@shell1.sea5.speakeasy.net \
    --to=brogoff@speakeasy.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=debian00@tiscali.be \
    /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).