Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
Is there a reason that tagless final encodings of monads seem to be so much less popular than initial style (especially free) encodings?
this is purely anecdotal, from what I have seen in public forums
MTL typeclasses are tagless final style
as a general rule, initial algebras are more "inspectable" -- you can transform them at will and do static analysis
final algebras are just code! so they're fast! but come at the cost that you've lost your introspection
the real play: use your final encoding to generate an initial one
or! do some smart CPS stuff to your analysis/simplifications in the algebraic constructors themselves
https://pdfs.semanticscholar.org/919b/f8bf264cb6c6627109ec6a9f88702e4aca8f.pdf is a great paper on both approaches
Woohoo! Thanks Sandy man!