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
[Caml-list] How can I check for the use of polymorphic equality?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-04-04 (09:25)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: [Caml-list] How can I check for the use of polymorphic equality?
Chris Hecker wrote:
> 
>> You probably will catch every reasonable usage of ( = ) that way...
>> Simple, no ?
> 
> But that a) requires you to put it in scope at the top of each file, and 
> more importantly b) means you can't use = anywhere, doesn't it?

And c) puts the responsibility to avoid misuses of structural comparison 
into the hands of the clients of an abstract type, instead of enabling 
its implementer to prevent them. That counters the very idea of type 
abstraction and is hence not The Right Thing. ;-)

   - Andreas

-- 
Andreas Rossberg, rossberg@ps.uni-sb.de

"Computer games don't affect kids; I mean if Pac Man affected us
  as kids, we would all be running around in darkened rooms, munching
  magic pills, and listening to repetitive electronic music."
  - Kristian Wilson, Nintendo Inc.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners