Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Scala 3 - A Quick Tour - Scala Italy 2021
Search
Daniela Sfregola
October 23, 2021
Programming
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Scala 3 - A Quick Tour - Scala Italy 2021
Daniela Sfregola
October 23, 2021
More Decks by Daniela Sfregola
See All by Daniela Sfregola
Scala 3 - A Quick Tour - Singapore Scala Programmers 2021
danielasfregola
1
140
ScalaBase 2021- FP: the Good, the Bad, the Ugly
danielasfregola
0
220
Top 5 Cool Things about Scala 3 (that are not enums)
danielasfregola
0
260
LSUG 2019 - FP: The Good, The Bad and The Ugly
danielasfregola
2
330
Scala IO 2019 - FP: The Good, The Bad and The Ugly
danielasfregola
1
890
Scala Days 2019 - Refactor all the things!
danielasfregola
0
320
Refactor all the things!
danielasfregola
0
550
Scala Italy 2018 - Random Data Generation with ScalaCheck
danielasfregola
0
1.8k
Scala Days 2018 Berlin - A Pragmatic Introduction to Category Theory
danielasfregola
2
1.4k
Other Decks in Programming
See All in Programming
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
240
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
APNsからLive Activityを開始する話
yumnumm
0
160
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
160
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.7k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
100
残高管理から台帳サービスへの進化
artoy
0
190
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
760
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
400
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.6k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
450
The Cult of Friendly URLs
andyhume
79
7k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
540
Building Adaptive Systems
keathley
44
3.2k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
720
How to Ace a Technical Interview
jacobian
280
24k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.3k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Transcript
Scala 3 A Quick Tour @DanielaSfregola Scala Italy - October
2021
Hellooooo • Software Engineer living in London UK •
Scala Lover ❤ • OS Maintainer • Author of "Get Programming with Scala" by Manning 35% OFF on EVERYTHING with code "ctwscalait21"
Scala 3 is here! • After 8 years of work
• 28,000 commits • 7,400 pull requests • 4,100 closed issues • ...released on May 13th, 2021! https://www.scala-lang.org/blog/2021/05/14/scala3-is-here.html
An overview • https://dotty.ep fl .ch/docs/reference/overview.html
@main Annotation object HelloWorld extends App { println("Hello World!" )
}
@main Annotation object HelloWorld extends App { println("Hello World!" )
} object HelloWorld { @main def hello: Unit = { println("Hello world!" ) } }
@main Annotation object HelloWorld extends App { println("Hello World!" )
} object HelloWorld { @main def hello: Unit = { println("Hello world!" ) } } object Hello { @main def echo(n: Int, word: String): Unit = { println(word * n ) } }
Parametrized Traits trait Nameable { def name: Strin g }
Parametrized Traits trait Nameable { def name: Strin g }
trait Nameable(name: String)
Intersection Types class A class B def foo: A &
B = ???
Union Types class A class B def foo: A |
B = ???
Package Object // in file my/demo/package.scal a package m y
package object demo { def customLog(msg: String) { println(s"Customised package log: $msg" ) } }
Package Object // in file my/demo/package.scal a package m y
package object demo { def customLog(msg: String) { println(s"Customised package log: $msg" ) } } [ DROPPED ]
Enums sealed abstract class Color(val rgb: Int) case object Red
extends Color(0xFF0000 ) case object Green extends Color(0x00FF00 ) case object Blue extends Color(0x0000FF)
Enums sealed abstract class Color(val rgb: Int) case object Red
extends Color(0xFF0000 ) case object Green extends Color(0x00FF00 ) case object Blue extends Color(0x0000FF) enum Color(val rgb: Int) : case Red extends Color(0xFF0000 ) case Green extends Color(0x00FF00 ) case Blue extends Color(0x0000FF)
Improved Type Inference Map("Scala" -> 3).map { (k, v) =>
s"$k$v" }
Improved Type Inference Map("Scala" -> 3).map { (k, v) =>
s"$k$v" } Scala 2.13.4
Improved Type Inference Map("Scala" -> 3).map { (k, v) =>
s"$k$v" } Scala 2.13.4
Improved Type Inference Map("Scala" -> 3).map { (k, v) =>
s"$k$v" } Scala 3.0.0
Improved Type Inference Map("Scala" -> 3).map { (k, v) =>
s"$k$v" } Scala 3.0.0 Scala 2.13.4
Procedure Syntax def echo(str: String) { st r }
Procedure Syntax def echo(str: String) { st r } Scala
2.13.4
Procedure Syntax def echo(str: String) { st r } Scala
2.13.4
Procedure Syntax def echo(str: String) { st r } Scala
3
Procedure Syntax def echo(str: String) { st r } Scala
3
Improved Error Messages Arrested Developers What the Scala Compiler &
Lucille Bluth Have In Common by Fiona Condon, NeScala 2017 https://www.youtube.com/watch?v=78iIbiRwFTM
Improved Error Messages def echo(str: String): Unit = { st
r } def echoTwice(str: String): String = { echo(str) match { case x: String => s"$x$x " } }
Improved Error Messages Scala 2.13.4
Improved Error Messages Scala 2.13.4 Scala 3
Strict Equality List("Scala", "3").headOption == "Scala"
Strict Equality List("Scala", "3").headOption == "Scala" Scala 2.13.4
Strict Equality List("Scala", "3").headOption == "Scala" Scala 2.13.4 Scala 3
Compatibility with 2.13 Migrating to Scala 3 is easy* !
* if you are using Scala 2.13 * if you don't have macros in your code Scala 3 Migration Guide https://docs.scala-lang.org/scala3/guides/migration
Thank You! •Twitter: @DanielaSfregola •"Get Programming with Scala" by
Manning 35% OFF on EVERYTHING with code "ctwscalait21"