Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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.


Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
Bug reports:  FAQ:
To unsubscribe, mail  Archives: