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-06-30 (15:30)
From: Eijiro Sumii <sumii@s...>
Subject: polymorphic equality and overloading
Dear Caml Developers/Users,

(sorry that I don't know French)

This might be an FAQ, but could someone please give a rationale to the
polymorphic (in)equalities such as = and < in Caml?  While they have a
parametric polymorphic type 'a -> 'a -> bool, their semantics is ad
hoc rather than parametric with respect to the type 'a (for example,
they are undefined for functions), which I found confusing to some
users---at least, a friend of mine was confused, and chose Haskell
(which has type classes) over Caml!

// Eijiro Sumii <sumii@saul.cis.upenn.edu>
// currently visiting: Department of Computer and Information Science,
// School of Engineering and Applied Science, University of Pennsylvania