4 ms·
One of the reasons is surely that different fields of maths/engineering reuse the same symbols to have different meanings.
by kibibu 12y ago
One of the reasons is surely that different fields of maths/engineering reuse the same symbols to have different meanings.
- chriswarbo 12y agoWe know how to do type-directed operator overloading in unambiguous cases, eg. static methods in OO, modules and typeclasses in FP. This is often (ab)used to distinguish between alternative definitions. For example, Haskell's Monoid module defines several type synonyms for booleans and numbers, each of which has a different Monoid definition: https://hackage.haskell.org/package/base-4.7.0.2/docs/Data-Monoid.html https://hackage.haskell.org/package/base-4.7.0.2/docs/Data-M... If we trigger an error for ambiguous cases, the path of least resistance is to make things unambiguous.