Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] Custom operators in the revised syntax
On 5/11/07, Jon Harrop <jon@ffconsultancy.com> wrote:
> On Friday 11 May 2007 15:15, Loup Vaillant wrote:
> > I tend to agree when one says custom operators are evil. However, when
> > the default syntax uses operators, the custom ones are a net win : a
> > wise programmer will use their semantic load carefully (big nums, for
> > example)
>
> Ints, nats, floats, complexes, quaternions, column and row vectors, matrices,
> tensors, inner and outer products, symbolic expressions... This is why I like
> operator overloading.
>
> For example, Smoke has the multiplications: * (int), *. (float), *| (vector
> scaling), *|| (matrix-vector transform) and *||| (matrix-matrix multiply).
>
> 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?

-- 
Nicolas Pouillard
who also likes overloading and meta-programming....