Great presentation. I wonder why other people who tried to explain tagless final never bothered to define and explain the basics of tagless final. This is the best tagless final explanation that I have seen so far.
At time 13:30, it should be "&&" not "||" ```scala object Tagging { case class Or(left: Expr, right: Expr) extends Expr("bool") { assert(left.tag == "bool" && right.tag == "bool") } } ``` As always great video :)
Awesome video and interesting concept. I once had this exact problem to solve and I settled with the solution 2; although there was also a need for serialisation/deserialization of entire expression, so case classes where nice to have.
There are various solutions to the expression problem. Each solution varies in the amount of code a user must write to implement them, and the language features they require. Multiple dispatch[12] Ruby syntax Open classes[13] Coproducts of functors[14] Type classes[15] Tagless-final[16] / Object algebras[17] Polymorphic Variants[18]
Great explanation, the best I have seen so far. I really like the way you explain these highly abstract concepts. And since there was this article of tagless final being dead floating around where Jonh pointed out that we should use effect libraries instead could you make a video comparing these 2 concepts?
@@rockthejvm I saw a video saying that the tagless finally solves this problem and is indicated as an advantage over using GADTs. Cannot figure that one out. Wondered if you could explain how.
Amazing, excellent presentation. Thank you for separating the pattern from type classes. Finally a good, clear explanation.
That was the goal!
Great presentation. I wonder why other people who tried to explain tagless final never bothered to define and explain the basics of tagless final. This is the best tagless final explanation that I have seen so far.
Masterfully explained !!!
At time 13:30, it should be "&&" not "||"
```scala
object Tagging {
case class Or(left: Expr, right: Expr) extends Expr("bool") {
assert(left.tag == "bool" && right.tag == "bool")
}
}
```
As always great video :)
Ah, sorry about that. You got the point, though :P
Best TF guide!
Thank you so much for the explanation. Finally know why its called "Tagless Final" after reading about it for so long
It kind of makes me a bit angry that it took so long to finally realize why it's called tagless final
Things finally fall into place! I've seen a lot of TF usage and had lots of issues grokking it all. Thank you!
Thank you Daniel! It's the best explanation of the TF I've ever seen!
Awesome video and interesting concept. I once had this exact problem to solve and I settled with the solution 2; although there was also a need for serialisation/deserialization of entire expression, so case classes where nice to have.
thanks. your videos explain tricky stuff in a very clear visual way.
There are various solutions to the expression problem. Each solution varies in the amount of code a user must write to implement them, and the language features they require.
Multiple dispatch[12]
Ruby syntax Open classes[13]
Coproducts of functors[14]
Type classes[15]
Tagless-final[16] / Object algebras[17]
Polymorphic Variants[18]
Great presentation. Thank you Daniel.
Great explanation, the best I have seen so far. I really like the way you explain these highly abstract concepts. And since there was this article of tagless final being dead floating around where Jonh pointed out that we should use effect libraries instead could you make a video comparing these 2 concepts?
Perfect Explanation. Thanks a lot.
Thanks!
You're welcome!
Super useful video, thank you.
Can you comment on the expression problem?
What about it?
@@rockthejvm I saw a video saying that the tagless finally solves this problem and is indicated as an advantage over using GADTs. Cannot figure that one out. Wondered if you could explain how.
eval_v2 has to recursively call eval_v2 (not eval) - that's why casts are needed, right? ruclips.net/video/m3Qh-MmWpbM/видео.html