Browse thread
Custom operators in the revised syntax
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jon Harrop <jon@f...> |
| Subject: | Re: [Caml-list] Custom operators in the revised syntax |
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. :-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. The F#.NET Journal http://www.ffconsultancy.com/products/fsharp_journal/?e