Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Eijiro Sumii <sumii@saul.cis.upenn.edu>
To: garrigue@kurims.kyoto-u.ac.jp
Cc: sumii@saul.cis.upenn.edu, caml-list@inria.fr
Subject: Re: polymorphic equality and overloading
Date: Tue, 04 Jul 2000 22:37:09 -0400	[thread overview]
Message-ID: <20000704223709A.sumii@saul.cis.upenn.edu> (raw)
In-Reply-To: <20000705101152P.garrigue@kurims.kyoto-u.ac.jp>

Hi Jacques (and Camlers),

> The point I was trying to make is just that Ocaml, to avoid
> complications in the type system, only allows universal overloading,

That's clear, I believe, and my question was "why overload the
(in)equalities".

> I think hashing and marshalling will not bother you:

No, they don't.

> Comparison may not be always the one you expect, but in practice
> this is enough to define efficient sets and maps.

I'm not sure why it is "enough in practice", for...

> you will have to define you own comparison if you need something
> coarser

this reason, but I agree that it has some uses as you wrote.

> Haskell's solution may seem more intuitive, but it uses a much more
> complex type system, and puts the burden of writing comparisons on the
> user.

I agree.  By the way, I myself am not a Haskell devotee---I just have
a friend who has chosen Haskell over Caml because of the issues on
overloading.  I hope to see what he says after he finish the "Gentle
Introduction to Haskell" tutorial.:-)

So, to summarize everyone's replies, the polymorphic (in)equalities
exist because they are of "some" use, though they might be somewhat
confusing---Is this correct?

Eijiro



  reply	other threads:[~2000-07-05 21:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-29 21:10 Eijiro Sumii
2000-06-30 17:08 ` Brian Rogoff
2000-06-30 17:51   ` Eijiro Sumii
2000-07-04  7:09     ` Jacques Garrigue
2000-07-04 12:42       ` Eijiro Sumii
2000-07-05  1:11         ` Jacques Garrigue
2000-07-05  2:37           ` Eijiro Sumii [this message]
2000-07-05 21:22         ` Pierre Weis
2000-07-05 21:30           ` Eijiro Sumii
2000-07-05 22:15             ` Pierre Weis
2000-07-05 23:09               ` Eijiro Sumii
2000-07-06 17:18             ` Benjamin Werner
2000-07-05 22:40 John R Harrison

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=20000704223709A.sumii@saul.cis.upenn.edu \
    --to=sumii@saul.cis.upenn.edu \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /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