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
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: 2000-07-01 (08:40)
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?