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
Custom operators in the revised syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-12 (02:54)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Custom operators in the revised syntax
On Friday 11 May 2007 15:46, you wrote:
> > Operator overloading and template metaprogramming were the only things I
> > missed moving from C++ to OCaml. :-)
> But having these custom operators reduce the pain, right?

Using, +, +., +| and +|| is better than add, add_float, add_vector, add_matrix 
but allowing + to be used to all such types ('a -> 'a -> 'a) is much better 
still. It isn't even that hard to add to the language.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
The F#.NET Journal