4 ms·
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
by gclaramunt 12y ago
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.
- StefanKarpinski 12y agoI started to write those but it got a bit long for a comment. – Fermat
- gclaramunt 12y agoBut those are pretty short to write (explaining the category theory machinery behind it takes several book chapters tho :) )