DEV Community

Discussion on: Functional design: tagless final

Collapse
 
louy2 profile image
Yufan Lou

I was excited to see tagless final in TypeScript. Sadly this is not that. This is just one of the monad classes in mtl. Still cool, just the wrong title.

In Haskell the problem of this approach (mtl) is that the chain operator cannot be inlined and optimized away because of type class indirection. I wonder if the JIT compiler in V8 can do better.