From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA17765; Sun, 10 Feb 2002 14:50:51 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA32521 for ; Sun, 10 Feb 2002 14:50:50 +0100 (MET) Received: from relay-3v.club-internet.fr (relay-3v.club-internet.fr [194.158.96.114]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g1ADooD20858 for ; Sun, 10 Feb 2002 14:50:50 +0100 (MET) Received: from warp (lns03v-6-178.w.club-internet.fr [212.194.41.178]) by relay-3v.club-internet.fr (Postfix) with SMTP id AADD816A0 for ; Sun, 10 Feb 2002 14:50:48 +0100 (CET) Message-ID: <009e01c1b239$517f6cf0$0700a8c0@warp> From: "Warp" To: "OCaml" References: Subject: Re: [Caml-list] Suggestion for overloaded operators Date: Sun, 10 Feb 2002 14:46:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > Helo. > > One of missing thing in Ocaml is the possibility to overload the operators > > such as + - / * = (by overloading, i mean : defining such operators for > > other types than -int- ).... > > Here's a syntactic proposal to enable this feature : > > You say nothing about the typing of static overloading (interaction with > polymorphism and type inference), and this is the crux of the matter. Actually this was only a syntactic suggestion for overload. I don't know well enough the ocaml typing algorithms to suggest the correct way to implement it and to solve problems such as : > What type would you give to: > fun a b -> a :+ b > ? Warp ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr