From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA17936 for caml-red; Mon, 18 Dec 2000 18:34:06 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA18630 for ; Mon, 18 Dec 2000 16:23:44 +0100 (MET) Received: from mrwall.kal.com (mrwall.kal.com [194.193.14.236]) by concorde.inria.fr (8.11.1/8.10.0) with SMTP id eBIFNgT01146 for ; Mon, 18 Dec 2000 16:23:43 +0100 (MET) Received: from mrwall.kal.com [194.193.14.236] (HELO localhost) by mrwall.kal.com (AltaVista Mail V2.0J/2.0J BL25J listener) id 0000_0045_3a3e_2c52_a53b; Mon, 18 Dec 2000 15:25:06 +0000 Received: from somewhere by smtpxd Message-ID: <3145774E67D8D111BE6E00C0DF418B66395AEC@nt.kal.com> From: Dave Berry To: John Max Skaller , Mattias Waldau Cc: caml-list@inria.fr Subject: RE: ROverloading Date: Mon, 18 Dec 2000 15:27:03 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain; charset="iso-8859-1" Sender: weis@pauillac.inria.fr John Max Skaller wrote: > Unfortunately, overloading isn't quite so simple when > you've also got type inference: That depends on how general you try to be. I'd be quite happy with a system that allowed multiple definitions of a name, but forced applications to be monomorphic. In your example, the definition of f would require a disambiguating type annotation (or assume a default): > let f a b = a + b in > let x = f 1.0 2.0 in > let y = f 1 2 in would become let f a b = a + b : int in ... Theoretically inelegant, but pragmatically sufficient. As indeed you seem to be doing in Felix. I'd use the module system to introduce and control overloading, rather than trying to extend the core language. It seems a simpler route. Dave.