English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Suggestion for overloaded operators
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-02-10 (17:49)
From: Tom <tom7ca@y...>
Subject: Re: [Caml-list] Suggestion for overloaded operators
> Here's a syntactic proposal to enable this feature :
> (a :+ b)
> The ':' is here to precise that we're using overloading , and a and b can be
> of any type. ( let's say typea and typeb )

I don't see why overloading should just apply to operators;
it can just as well apply to functions.

More importantly, the problem isn't coming up with a syntax
or indicating that something is overloaded, the problem is
doing the type checking efficiently in the presence of 
type variables.

SML/NJ and Haskell each have partial solutions to the problem.
You may want to look there.


Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
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