- In this course we will:
- Start from an existing Scala (2.13)/Akka Typed (2.6) based application
- Apply features introduced in the Scala language as part of the Scala 3 project
- The objective is to illustrate how these new features:
- Bring added value and can simplify Scala code
- Remove some of the inconsistencies or warts from the Scala 2 language
- The participants should have practical experience with the Scala 2 language
- The course has a number of exercises and each student should have a computer with the following installed:
- JDK 11 (e.g. AdoptOpenJDK 11)
- sbt
- An editor or IDE of your choice configured to work with Scala 3 code
- Possible options are:
- Metals with your client of choice (Visual Code Studio, Vim, etc…)
- IntelliJ IDE with the Scala plugin installed and configured to use the nightly build
- Possible options are:
- Optionally install the Scala 3 compiler and Scala 3 REPL
- This can be done using Coursier:
cs install scalac:3.3.0
cs install scala:3.3.0
- This can be done using Coursier:
- Download the student-ready version of the exercises here
- Unzip the downloaded artefact and
cd
into thelunatech-scala-2-to-scala3-course
folder- This folder contains an
sbt
project that contains all the exercises
- This folder contains an
- Start an
sbt
session in the root folder - Load the project into your favourite development environment (IDE)
- We use the
cmtc
command from the command line to navigate the course.
- Course Overview
- Scala 3 Migration course
- Setting up the Scala 3 Migration Tool
- Migrating:
- Scala dependencies
- Scala compiler options
- Scala syntax
- Types
- Moving from Scala 2 to Scala 3 workshop/course
- A recap on:
- Scala 2
- The Scala 3 project
- The Akka Toolkit
- A [detailed] look at the Scala 2/Akka Typed based Sudoku Solver
- A recap on:
- Scala 3 features & exercises:
- scala3-compiler code rewrite capabilities
- Wrap-up & Conclusions
- Eric Loots (Lunatech Belgium)
- Adrien Piquerez (EPFL Scala Center Switzerland)
- Trevor Burton-McCreadie (Lunatech United Kingdom)
- Briefly introduce yourself (Name? Where do you live/work? Passions, ...)
- What is your connection with Scala [3]?
- Please share your experience with Scala and your migration experiences, if any.
- What would you like to learn in the coming two days?