Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

Tom


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
-------------------
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