Saturday, February 13, 2021
Scala 3 is just around the corner. Both EPFL and the broader community have put a lot of work into making this Scala release a success. In this talk, I will outline some of the history behind Scala 3 and what steps we took in the Typelevel ecosystem to get ready for Scala 3, and keep up with its development.
I am the type of person who learns new technologies on the job, so I needed a project to explore Scala 3 in-depth. More or less at the same time, we’ve decided to make our apartment just a bit smarter, and I thought this is a perfect occasion to play with Scala 3 (and many other toys).
My plan was simple: start with existing, stable integration: Home Assistant running on Raspberry PI, explore and use Scala on top of that.
Home Assistant has a fantastic ecosystem that reminds me of one we have in Scala. Everything I’ve done with Scala I could have achieved easier and faster with built-in automation, Node-Red or Python but this project was all about learning and fun!
So let me show how it works and how new features from Scala 3 can improve even such a small project.
At Inpher, we have built a domain specific language (DSL) for modelling privacy preserving computations. This DSL is targeted at cryptographers who are not necessarily familiar with Scala at all, yet it is written entirely in Scala 3! In this talk, I will present some of Scala 3's new features that were used to make the DSL powerful while keeping it very user friendly. I will share some experiences we've had as early adopters of Dotty, as well as some lessons learned while introducing the DSL to complete newcomers of the language.
With Scala 3 right around the corner, now is the perfect time to discover exciting new features, that will simplify or reinvent how we write Scala applications. In this talk I will give you a taste of the future. I will be live-coding to compare how certain problems were solved using Scala 2 and what Scala 3 brings to the table.
Scala has a highly expressive type system for modeling sets of instances, and their properties. But it can be hard for programmers to get a good intuition for what different types represent if we only see types through the source code that describes them.
This talk will be a journey through the Scala type system, examining the wealth of types on offer in Scala 2 and Scala 3, and presenting each in a visual form, showing the relationships between them, and developing an understanding of operations such as finding the least upper-bound of a pair of types. Furthermore, we will see how the concept of categorical duality arises every step of the way.
Have you always wanted amazing compile-time features in your API, but been afraid of the Scala 2 macro syntax? Have no fear, Scala 3 is here! Scala 3 provides a rich set of features that negate the need for most macros and provide an incredible toolset for APis that are easy to maintain. We'll look at using inline methods, tuples and derived code to create performant AND flexible APIs, as well as prototype implementations from GPU + serialization use cases.
A quick agenda: Improving performance with Inline Deriving code at compile time & working with Tuples Writing good error messages w/ inline When not to inline
In the first Scala Love online conference on April 17, 2020, I gave a talk entitled Understanding Scala’s Type System. That talk mostly covered aspects common to Scala 2 and 3, it did cover union and intersection types. This talk is a continuation of that talk. It covers more advanced aspects of the type system, mostly new forms of types that are being introduced in Scala 3.
Implicits are one of Scala's most powerful features. This single mechanism can be used in various idiomatic ways to implement a number of capabilities, like implicit conversions. One of the biggest changes in Scala 3 is a reworking of implicits to introduce new constructs that make the capabilities more intuitive, with less emphasis on a single mechanism.
The new constructs include extension methods, a new way to write type classes, given instances with using clauses, given imports, and new implicit conversions. I'll discuss how to use them, how they contrast with Scala 2 idioms, and how Scala will gradually transition to them, supporting both implicits alongside the new features for a while.