Hacker News new | ask | show | jobs
by sampo 1912 days ago
> I never understand why operator overloading is said to make things more readable.

Ocaml doesn't overload even the arithmetic operators, so you write for integers

    1 + t * A
and for floating point

    1 +. t *. A
and for matrices you would make something like

    scal_mat_add(1, scal_mat_mul(t, A))
Do you really prefer these three, over writing

    1 + t * A
for all cases?