Re:From Object Algebras to Finally Tagless Interpreters
by gclaramunt on Sunday January 18, 2015 @12:24AM
(#8906746)
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.
[ Parent
| on HN ]
Re:From Object Algebras to Finally Tagless Interpreters
by StefanKarpinski on Sunday January 18, 2015 @11:10AM
(#8907827)
I started to write those but it got a bit long for a comment.
– Fermat
Re:From Object Algebras to Finally Tagless Interpreters
by gclaramunt on Monday January 19, 2015 @12:08PM
(#8912771)
But those are pretty short to write (explaining the category theory machinery behind it takes several book chapters tho :) )