Tagless Final in Scala

Поделиться
HTML-код
  • Опубликовано: 19 сен 2024

Комментарии • 25

  • @Niath
    @Niath 2 года назад +21

    Amazing, excellent presentation. Thank you for separating the pattern from type classes. Finally a good, clear explanation.

    • @rockthejvm
      @rockthejvm  2 года назад +3

      That was the goal!

    • @hernansaab1155
      @hernansaab1155 2 года назад +2

      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.

  • @vipulpatel-il9nb
    @vipulpatel-il9nb Месяц назад +2

    Masterfully explained !!!

  • @isarwarfp
    @isarwarfp 2 года назад +7

    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 :)

    • @rockthejvm
      @rockthejvm  2 года назад +2

      Ah, sorry about that. You got the point, though :P

  • @mdfitumi
    @mdfitumi 2 года назад +5

    Best TF guide!

  • @laiboonh
    @laiboonh 2 года назад +3

    Thank you so much for the explanation. Finally know why its called "Tagless Final" after reading about it for so long

    • @hernansaab1155
      @hernansaab1155 2 года назад +1

      It kind of makes me a bit angry that it took so long to finally realize why it's called tagless final

  • @BloodnutXcom
    @BloodnutXcom 2 года назад +1

    Things finally fall into place! I've seen a lot of TF usage and had lots of issues grokking it all. Thank you!

  • @RomanArkharov
    @RomanArkharov 2 года назад +1

    Thank you Daniel! It's the best explanation of the TF I've ever seen!

  • @TheMathmajki
    @TheMathmajki 2 года назад +2

    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.

  • @user-fg6ng7ej6w
    @user-fg6ng7ej6w Год назад +1

    thanks. your videos explain tricky stuff in a very clear visual way.

  • @TJ-hs1qm
    @TJ-hs1qm 8 месяцев назад

    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]

  • @alexolkhovskiy1918
    @alexolkhovskiy1918 2 года назад +1

    Great presentation. Thank you Daniel.

  • @marekrehora3568
    @marekrehora3568 2 года назад +2

    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?

  • @pankajpatil96
    @pankajpatil96 Год назад

    Perfect Explanation. Thanks a lot.

  • @maestro_denery
    @maestro_denery 2 года назад +2

    Thanks!

  • @AJKvideoproductions
    @AJKvideoproductions 2 года назад

    Super useful video, thank you.

  • @hugoferreira5033
    @hugoferreira5033 2 года назад

    Can you comment on the expression problem?

    • @rockthejvm
      @rockthejvm  2 года назад +1

      What about it?

    • @hugoferreira5033
      @hugoferreira5033 2 года назад

      @@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.

  • @ctm-9191
    @ctm-9191 2 года назад

    eval_v2 has to recursively call eval_v2 (not eval) - that's why casts are needed, right? ruclips.net/video/m3Qh-MmWpbM/видео.html