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
ambitious proposal: polymorphic arithmetics
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe TROESTLER <debian00@t...>
Subject: Re: [Caml-list] ambitious proposal: polymorphic arithmetics
On Wed, 06 Apr 2005, Eijiro Sumii <eijiro_sumii@anet.ne.jp> wrote:
> > But if 1 + 1.2 is going to throw an exception
> It doesn't, just as "1 = 1.2" doesn't - they are both compile-time errors.

My mistake.  Thanks for the correction.

> From: "William Lovas" <wlovas@stwing.upenn.edu>
> > Many experts (and perhaps some novices *shrug*) think that polymorphic
> > equality is a bad idea...
> I'm almost tempted to agree.:-) As other responses have also
> suggested, the issue seems to be "where to draw the line."  If so, I
> can perhaps restate my question as: why is the line drawn between =
> and + now?  Is it the best?

I'd like to ask from a non-expert standpoint: what would be the
advantages and drawbacks of something like type classes for OCaml?
Also, how do they compare with GCaml (in terms of flexibility,
extensibility, efficiency,...)?