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
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?