DEV Community

Yufan Lou
Yufan Lou

Posted on

1

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.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay