caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Pervasives.compare output type
Date: Thu, 31 Mar 2005 00:35:29 +0200	[thread overview]
Message-ID: <20050330223528.GC443@first.in-berlin.de> (raw)
In-Reply-To: <424ABB87.1020203@barettadeit.com>

On Wed, Mar 30, 2005 at 04:45:27PM +0200, Alex Baretta wrote:
> Xavier Leroy wrote:
> >It's a historical error.  If I were to do it again, I'd use a sum type
> >such as your "comparison_result".  The current solution allows to use
> >(-) (integer subtraction) as the comparison predicate for *small*
> >integer arguments, but this doesn't work as a general integer
> >comparison because of subtraction wrapping around for large arguments.
> >So, there are really no benefits to encode the result of a 3-way
> >comparison as an "int".
> >
> >- Xavier Leroy
> 
> Whether fixing such historical errors engenders more benefits than 
> trouble is a very interesting philosophical question.


Well, there are implementations of modules with and without
named parameters, why not providing different implementations
for compare?

Or maybe additionnally to "compare" provide a function
"comparison" or "comp" or something like that?

Is it sooooooo necessary to have only this one "compare"
function? Is it too much overhead in the interface to
add a function that uses sum-types?


Maybe commenting "compare" with an attribute like "do not use
in future developments" or so?!

Ciao,
    Oliver


      parent reply	other threads:[~2005-03-31  6:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-24 18:47 Alex Baretta
2005-03-24 19:41 ` [Caml-list] " Richard Jones
2005-03-24 21:00   ` Marcin 'Qrczak' Kowalczyk
2005-03-24 21:38     ` Bardur Arantsson
2005-03-24 22:07       ` [Caml-list] " Jason Hickey
2005-03-24 22:26         ` brogoff
2005-03-25  9:42         ` Alex Baretta
2005-04-01  5:59           ` Aleksey Nogin
2005-03-24 22:15       ` Marcin 'Qrczak' Kowalczyk
2005-03-24 22:41         ` Bardur Arantsson
2005-03-25  9:43         ` [Caml-list] " Alex Baretta
2005-03-29  7:14 ` [Caml-list] " Oliver Bandel
2005-03-30 14:17 ` Xavier Leroy
2005-03-30 14:45   ` Alex Baretta
2005-03-30 15:11     ` Jacques Carette
2005-03-30 15:28       ` Alex Baretta
2005-03-30 17:47       ` brogoff
2005-03-30 18:21         ` Jacques Carette
2005-03-30 18:49           ` brogoff
2005-03-30 20:06             ` Jon Harrop
2005-03-30 20:43               ` Jacques Carette
2005-03-30 22:14                 ` Christopher Dutchyn
2005-03-31  0:44                 ` brogoff
2005-03-30 22:43             ` GADT?? (Re: [Caml-list] Pervasives.compare output type) Oliver Bandel
2005-03-30 22:35     ` Oliver Bandel [this message]

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=20050330223528.GC443@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@yquem.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).