Hacker News new | past | comments | ask | show | jobs | submit login
Modular, composable, typed optimizations in the tagless-final style (2019) (okmij.org)
43 points by fanf2 on Sept 28, 2020 | hide | past | favorite | 8 comments



Tagless-final as a pattern works also fine in OO languages. It's called "object algebras" there.

https://oleksandrmanzyuk.wordpress.com/2014/06/18/from-objec...

In general it's one of the most elegant solutions to the expression problem I've seen so far.


What a brilliant article! This approach deserves be more widely known I think, thanks for the link.


If only all the Scala world which misuse the label "tagelss-final" heavily for some only very remotely related concept would read (and understand!) Oleg's papers…

It's such a simple but powerful concept which deserves more proper attention.


Thanks, that could explain why I was struggling so much to connect these two.


An application of the concepts can be seen here:

https://ora.ox.ac.uk/objects/uuid:fbad84a5-2a61-451a-8a1a-81...


Why is it called tagless-final


It's new to me as well, but this lecture (if you know Haskell) seems like a good overview. I've got some more things to look up before I could actually use this idea but if you read through this it may help:

http://okmij.org/ftp/tagless-final/course/lecture.pdf

With more here: http://okmij.org/ftp/tagless-final/index.html


It's the opposite of the "initial tagged" encoding.

And additionally I think "final" has also some meaning in mathematics that is related (which makes that name a little bit of a pun afaik).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: