Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We 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-M...

If we trigger an error for ambiguous cases, the path of least resistance is to make things unambiguous.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: