<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/11/fc1129f81c56884cc7eeba1ab3565fec"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-11-11T01:35:16"
  subject="Re: [Caml-list] Strange physical equality behavior"
  prev="2003/11/8e821ea8fec9431d896c85e2f2a14314"
  next="2003/11/6c7eeee8f6105aa3a5ef377169475e2c"
  prev-in-thread="2003/11/31b3758dc01ba9496581b9fd7e7c1e48"
  next-in-thread="2003/11/50f653064d6e45748cb96c80bc084526"
  prev-thread="2003/11/c1e744886a3affa901d1dcaf0e350359"
  next-thread="2003/11/09e582c31663ff8716cce84f773350e2"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/01e1b29e39f68e928829da73207a8c30"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-11-09T18:34:28"
  subject="[Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/a33bcd6e98a9ec945c42f2e24c4f7045"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-11-10T01:33:39"
  subject="Re: [Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/a4fa114bc35fac9ad8b2bce95978fe86"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-11-10T02:25:58"
  subject="Re: [Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/9230ae0d897716b56921b56f5d31f9fe"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-11-10T08:29:32"
  subject="Re: [Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/31b3758dc01ba9496581b9fd7e7c1e48"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2003-11-10T18:41:57"
  subject="Re: [Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/fc1129f81c56884cc7eeba1ab3565fec"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-11-11T01:35:16"
  subject="Re: [Caml-list] Strange physical equality behavior">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/11/50f653064d6e45748cb96c80bc084526"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-11-11T06:48:41"
  subject="Re: [Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/fcbf42708ad0d737e60ce7569d4ac60e"
  from="David Brown &lt;caml-list@d...&gt;"
  author="David Brown"
  date="2003-11-11T16:47:13"
  subject="Re: [Caml-list] Strange physical equality behavior">
<msg 
  url="2003/11/a13ba4cc36c14e7d7021336bcbc04024"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2003-11-12T00:32:48"
  subject="Re: [Caml-list] Strange physical equality behavior">
</msg>
</msg>
<msg 
  url="2003/11/2fe7f757bc7b5d10efc2915878644160"
  from="brogoff@s..."
  author="brogoff@s..."
  date="2003-11-11T17:08:25"
  subject="Re: [Caml-list] Strange physical equality behavior">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
From: Michal Moskal &lt;malekith@pld-linux.org&gt;
&gt; On Mon, Nov 10, 2003 at 05:29:24PM +0900, Jacques Garrigue wrote:
&gt; &gt; The last solution is not to bother about that: I'm yet to see code
&gt; &gt; mixing two sets of the same type but with different comparison
&gt; &gt; functions. Sounds silly.
&gt; 
&gt; For me it doesn't. You cannot prevent user from shooting his foot in
&gt; this case. For example consider:
&gt; 
&gt;   let cmp x y = Random.int ()
&gt; 
&gt; This is very good comparision functions, and can also be used with
&gt; functiorial interface. You may say it is silly, but random functions 
&gt; (that are not total orderings) can be created by accident (for example
&gt; by comparing some mutable member or what's not).

Looks like you are supporting my point.
I was just saying that I'm yet to see somebody trying to take the
union of two sets defined with different (supposedly correct)
comparison functions.
And you point out a much more probable danger, which cannot be
prevented neither by the type system or dynamic checks.
So using the type system (or dynamic checks) to prevent an unprobable
risk, while there are much more probable ones, seems an overkill.

But I won't go more in that direction: as a type freak, preventing any
risk is good.

     Jacques Garrigue

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

