Version française
Home     About     Download     Resources     Contact us    
Browse thread
polymorphic equality and overloading
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eijiro Sumii <sumii@s...>
Subject: Re: polymorphic equality and overloading
> Equality really is overloaded, but since overloading isn't easily
> integrated into ML style type systems, some other solution is chosen. 

So, I'm wondering why equality is overloaded in Caml, unlike addition
(+ for integers, +. for floats, ^ for strings, etc.) for example.  Or,
why is equality automatically defined for tuples and datatypes, while
addition isn't?  Is that just because it is often useful?

Eijiro