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
RE: [Caml-list] F#
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-08 (14:41)
From: Robert Fischer <RFischer@R...>
Subject: RE: [Caml-list] F#
> However, operator overloading (i.e. overloading symbols) makes numerical code 
> so much easier to read that it is worth sacrificing some inference for it.
>

Unless, of course, you like to know what it is you're actually doing.

It's bad enough trying to figure out what "+" means in an overloaded environment with nominal typing.  With duck typing, it's a mess, and it's a mess that both you and the compiler have to work hard to figure out.

I highly suggest checking out the Programmer-to-Programmer book on C# and their conversation about operator overloading.  They do a nice job documenting just why it's such a dangerous tool in the toolbox.

~~ Robert.