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

Hmm, but when you add a new type of expression, you still have to write the particular implementation of the functions for that type. There are other approaches to generic programming where when you add a new datatype, all the already defined functions work, and if you add a new function, it automatically works for all the datatypes.


I started to write those but it got a bit long for a comment.

– Fermat


But those are pretty short to write (explaining the category theory machinery behind it takes several book chapters tho :) )




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

Search: