DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,274 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Yufan Lou
Yufan Lou

Posted on

Tagless-Final is a Powerful Footgun

Read The False Hope of Managing Effects with Tagless-Final in Scala – John A De Goes. Some thoughts.

Tagless Final was initially designed for the purpose of embedding a language, and providing various implementations of that language. That is the most flexibility you can get without designing a new parser. To think this places any restraints on the programmer is a big misunderstanding.

Being able to substitute the implementation entirely may be a curse more than a blessing. It gives no guarantee as to what a piece of code means. Again, the original purpose was to embed a language, so that flexibility is a feature. Programming in this style is basically programming an interpreter or a compiler for an almost entirely new language.

But, for most purposes, it is rare that you can design a better language than the ones polished by many people over years. Just use them instead.

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.