<?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="2002/12/1b4c379f89d855c9d1298bdf96e7bbdb"
  from="Christophe Raffalli &lt;Christophe.Raffalli@u...&gt;"
  author="Christophe Raffalli"
  date="2002-12-02T20:07:08"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading."
  prev="2002/12/838549db9eab58c179d31f32eefdf381"
  next="2002/12/28fc7801c74d2b5e69dc9c4f54d9779e"
  prev-in-thread="2002/11/46af31715b4b0f59eee8f288116b65df"
  next-in-thread="2002/11/9766982fdad22bc2a829b8b8baa387de"
  prev-thread="2002/11/dc0f5dada3a68f0e55a2ffd45e11b02f"
  next-thread="2002/11/e405237a372aa3bf54ba01c32423b2dc"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/11/dfd8e2ae30a8e7e1d3ac51a2441815c3"
  from="Jørgen Hermanrud Fjeld &lt;jhf@h...&gt;"
  author="Jørgen Hermanrud Fjeld"
  date="2002-11-28T21:02:56"
  subject="[Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/11/7074d23158776559541d1bca5083ee21"
  from="Jørgen Hermanrud Fjeld &lt;jhf@h...&gt;"
  author="Jørgen Hermanrud Fjeld"
  date="2002-11-28T21:27:33"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
</msg>
<msg 
  url="2002/11/71c8bf02b9537481610dcd287c0bfa50"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-11-29T15:26:11"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/11/219b53344dce92d66cce24fdef8ea783"
  from="Christophe Raffalli &lt;raffalli@u...&gt;"
  author="Christophe Raffalli"
  date="2002-11-29T15:42:48"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
</msg>
<msg 
  url="2002/11/0f60fc1f1d4cbd07c2eed01e5d8a966a"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2002-11-29T15:49:41"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/11/2cbc7432a8cd6c199a1718b30cf5f7a8"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2002-11-29T18:08:10"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/11/70b50d8ab159d70091afb8553194898f"
  from="Mike Lin &lt;mikelin@M...&gt;"
  author="Mike Lin"
  date="2002-11-30T00:00:26"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/11/6789369fffce15cb5b80a58bda747169"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2002-11-30T21:13:29"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/11/e1070925e98b3e76aa6070d37d876d8c"
  from="Mike Lin &lt;mikelin@M...&gt;"
  author="Mike Lin"
  date="2002-11-30T23:06:51"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
</msg>
</msg>
<msg 
  url="2002/11/6c3472ad0ccf96210c6de6d28a32d9a9"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2002-11-30T21:41:43"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/12/8d89dbe35c1baac50b8e762ae69f4737"
  from="Pierre Weis &lt;pierre.weis@i...&gt;"
  author="Pierre Weis"
  date="2002-12-01T17:31:04"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/12/bd72ff56f03e9f3ab65776f4953eba4f"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2002-12-01T23:42:00"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/12/fefd91d7ae4be50db1f63cf49a9c7e3b"
  from="Remi VANICAT &lt;vanicat@l...&gt;"
  author="Remi VANICAT"
  date="2002-12-02T09:52:42"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2002/11/46af31715b4b0f59eee8f288116b65df"
  from="Pierre Weis &lt;pierre.weis@i...&gt;"
  author="Pierre Weis"
  date="2002-11-30T21:47:51"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
<msg 
  url="2002/12/1b4c379f89d855c9d1298bdf96e7bbdb"
  from="Christophe Raffalli &lt;Christophe.Raffalli@u...&gt;"
  author="Christophe Raffalli"
  date="2002-12-02T20:07:08"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
</msg>
</msg>
</msg>
<msg 
  url="2002/11/9766982fdad22bc2a829b8b8baa387de"
  from="Pierre Weis &lt;pierre.weis@i...&gt;"
  author="Pierre Weis"
  date="2002-11-30T21:37:22"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
</msg>
</msg>
<msg 
  url="2002/11/e7f26ac1944ee775ace489d42b335675"
  from="Pierre Weis &lt;pierre.weis@i...&gt;"
  author="Pierre Weis"
  date="2002-11-30T21:33:22"
  subject="Re: [Caml-list] Understanding why Ocaml doesn&apos;t support operator overloading.">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Pierre Weis wrote:

 &gt;
 &gt; Yes: I suspect a really nasty corner in this area. As far as I
 &gt; remember, the kind of types you suggest is known as ``intersection
 &gt; types'', and the type reconstruction problem for languages featuring
 &gt; those types is just undecidable. The big problem with this kind of
 &gt; stuff is to restrict the type schemes allowed in your type system such
 &gt; that you do not fall into the undecidable general case, while still
 &gt; maintaining a powerful enough type system to properly typecheck the
 &gt; function double (fun x -&gt; x + x).
 &gt;

This is not the only solution: another solution is to keep the simple (in the
definition) type system with an incomplete algorithm that will always succeed
if enough type information. This works for instance for Mitchell's system F
with subtyping (see my normaliser:
&lt;http://lama-d134.univ-savoie.fr/~raffalli/normaliser.html&gt;)

The diffculty is that you need to have a very good way of printing typing error
message so that the user can easily guess where to add type information until
it works or a real error in the code is detected. Recent work (in a simple
setting) by Christian Haack, and Joe Wells
&lt;http://www.cee.hw.ac.uk/ultra/compositional-analysis/type-error-slicing&gt; let
me think that there may be a (non trivial) solution.

The big advantage, is that there are (undecidable) type systems that can
unifies typing of record, modules and object; functor and functions. Then, you
have a simpler type system definition which is easier to extend (with operator
overloading, for instance).

Remark: it does not change much the picture, because you have to find a
subsystem of the simple undecidable system. The difference, is that you can
define the subsystem by some limit to the typing complexity in the undecidable
system ... This is still far from trivial, but there is a lot of freedom (so
place for research :-).

-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
-------------------
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>

