u/kubukozcats,cats-effectin r/scala • Recommends
How Scala MAGICALLY turns everything into functions!
#applymethod#caseclasses#scalafunctions
3.7K subscribers • 30 videos on Hallway
Beginner. No background in the topic needed.
2.5K views4 years ago1 recommendation
Programming languagesScalaLanguage design and type systems
Jakub Kozłowski explains the mechanics behind how Scala allows collections and case classes to be invoked like functions using the apply method.
Have you ever wondered why collections in Scala can be called like functions? Or how you don't need to write "new" when creating a case class instance? This video is for you - we'll uncover the secret of what makes it all work. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) I'm on Twitter: twitter.com/kubukoz on GitHub: github.com/kubukoz sometimes stream on Twitch: twitch.tv/kubukoz And you can buy me a coffee if you want: ko-fi.com/kubukoz Read the code: github.com/kubukoz/videos/tree/main/everything-function Chapters: Have you ever wondered why collections in Scala can be called like functions? Or how you don't need to write "new" when creating a case class instance? This video is for you - we'll uncover the secret of what makes it all work. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) I'm on Twitter: twitter.com/kubukoz on GitHub: github.com/kubukoz sometimes stream on Twitch: twitch.tv/kubukoz And you can buy me a coffee if you want: ko-fi.com/kubukoz Read the code: github.com/kubukoz/videos/tree/main/everything-function Chapters: - Introduction - Collections as functions - How does it work? - apply as a factory method - What case classes do - Smart constructors - Summoning typeclass instances - Pitfalls - complexity of a rare feature - Pitfall - accidental implicit conversion - Scala 3's Conversion type to the rescue - unapply - Summary - Parting wordsu/kubukozcats,cats-effectin r/scala • Recommends