Please log in to watch this conference skillscast.
Context functions made their debut in Scala 3.0, but are still alien to many Scala developers. In my talk I’d like to tame the beasts and benefit from them.
First, I will start with the basics. I am going to explain where the idea of context functions came from and what problem they intended to solve. Then I will show how to put them to work by creating simple DSL.
Subsequently, we’ll get to know the unexpected sides of the beasts: How they interact with type inference, the weirdest part of the context functions. I’ll go into more detail and explain why context functions behave differently from ordinary functions in the type system.
Lastly, I’ll tackle an important question: “Is it true that context functions don’t compose well?” I’ll show the common pitfalls and how to avoid them, and I’ll reveal some nifty hacks that I came across while experimenting.
I hope that after this talk, the listeners will be able to use and understand context functions but also understand where and how they can safely use them and where they should avoid them.
YOU MAY ALSO LIKE:
- Haskell eXchange 2022: Novice Track (Online Conference on 7th December 2022)
- YOW! Melbourne Developer Conference 2022 (in Melbourne on 8th - 9th December 2022)
- Next generation i18n with rust (icu4x) and zero-copy deserialization (in Zürich on 7th December 2022)
- December 2022 Meetup (in Collingwood on 8th December 2022)
- What Logic can Teach Us, Scala Programmers (SkillsCast recorded in October 2022)
- The Middle Way for Static Typing in Spark DataFrames (SkillsCast recorded in October 2022)