How Scala MAGICALLY turns everything into functions!
Автор: Jakub Kozłowski
Загружено: 2022-02-15
Просмотров: 2448
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: / kubukoz
on GitHub: https://github.com/kubukoz
sometimes stream on Twitch: / kubukoz
And you can buy me a coffee if you want: https://ko-fi.com/kubukoz
Read the code:
https://github.com/kubukoz/videos/tre...
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: / kubukoz
on GitHub: https://github.com/kubukoz
sometimes stream on Twitch: / kubukoz
And you can buy me a coffee if you want: https://ko-fi.com/kubukoz
Read the code:
https://github.com/kubukoz/videos/tre...
Chapters:
00:00:00 - Introduction
00:00:14 - Collections as functions
00:02:31 - How does it work?
00:03:17 - apply as a factory method
00:04:14 - What case classes do
00:04:40 - Smart constructors
00:05:29 - Summoning typeclass instances
00:05:59 - Pitfalls - complexity of a rare feature
00:07:14 - Pitfall - accidental implicit conversion
00:08:42 - Scala 3's Conversion type to the rescue
00:09:12 - unapply
00:10:16 - Summary
00:10:39 - Parting words
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: