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

It works well when you stick to math and follow mathematical laws. Overloading the addition operator to allow you to add two vectors is great, as long as you make sure you don’t break the laws of vector addition in your vector space.

Overloading addition to mean something else entirely? That’s a problem!

It would be great if type systems could allow us to set up these laws and enforce them at compile time, but then you go down the whole rabbit hole of automated theorem proving.



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

Search: