4 ms·
> 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 inte
by sampo 6y 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?