Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Top 5 Cool Things about Scala 3 (that are not enums)

Top 5 Cool Things about Scala 3 (that are not enums)

Top 5 Cool Things about Scala 3 (that are not enums)

....because of course Scala 3 enums are the coolest!

E99b07644586e9e1723757bf8e34ea68?s=128

Daniela Sfregola

April 23, 2021
Tweet

Transcript

  1. Top 5 Cool Things about Scala 3 that are not

    enums @DanielaSfregola Scala 3 Release Party - April 2021
  2. Hellooooo • Software Engineer 
 living in London UK •

    Scala Lover ❤ • OS Maintainer • Author of 
 "Get Programming with Scala" by Manning
 
 35% OFF with code "scala3party"
  3. 5 - Improved Type Inference Map("Scala" -> 3).map { (k,

    v) => s"$k$v" }
  4. 5 - Improved Type Inference Map("Scala" -> 3).map { (k,

    v) => s"$k$v" } Scala 2.13.4
  5. 5 - Improved Type Inference Map("Scala" -> 3).map { (k,

    v) => s"$k$v" } Scala 2.13.4
  6. 5 - Improved Type Inference Map("Scala" -> 3).map { (k,

    v) => s"$k$v" } Scala 3.0.0
  7. 5 - Improved Type Inference Map("Scala" -> 3).map { (k,

    v) => s"$k$v" } Scala 3.0.0 Scala 2.13.4
  8. 4 - Procedure Syntax def echo(str: String) { str }

  9. 4 - Procedure Syntax def echo(str: String) { str }

    Scala 2.13.4
  10. 4 - Procedure Syntax def echo(str: String) { str }

    Scala 2.13.4
  11. 4 - Procedure Syntax def echo(str: String) { str }

    Scala 3
  12. 4 - Procedure Syntax def echo(str: String) { str }

    Scala 3
  13. 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
  14. 3 - Improved Error Messages def echo(str: String): Unit =

    { str } def echoTwice(str: String): String = { echo(str) match { case x: String => s"$x$x" } }
  15. 3 - Improved Error Messages Scala 2.13.4

  16. 3 - Improved Error Messages Scala 2.13.4 Scala 3

  17. 2 - Strict Equality List("Scala", "3").headOption == "Scala"

  18. 2 - Strict Equality List("Scala", "3").headOption == "Scala" Scala 2.13.4

  19. 2 - Strict Equality List("Scala", "3").headOption == "Scala" Scala 2.13.4

    Scala 3
  20. 1 - 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://scalacenter.github.io/scala-3-migration-guide
  21. Thank You! •Twitter: @DanielaSfregola •"Get Programming with Scala" 
 by

    Manning
 
 35% OFF with code "scala3party"