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

Using maths to either oppose or support generic duck typing is just pointless, because it's easy to come up with counterexamples where a mathematical operation would or would not behave as expected.

In quite a few cases where one would overload a mathematical operation to, say, sum two objects of certain type, it'd be better to explicitly type out the operation as a functor/lambda.



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

Search: