From be265c19d193e11f7d80949573564db9f753c897 Mon Sep 17 00:00:00 2001 From: Carsten Lenz Date: Fri, 25 Jun 2021 17:12:58 +0200 Subject: [PATCH] Add Scala3 to trial --- radar/2021-01-01/scala3.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 radar/2021-01-01/scala3.md diff --git a/radar/2021-01-01/scala3.md b/radar/2021-01-01/scala3.md new file mode 100644 index 0000000..a3668e6 --- /dev/null +++ b/radar/2021-01-01/scala3.md @@ -0,0 +1,37 @@ +--- +title: "Scala 3" +ring: "trial" +quadrant: "languages-and-frameworks" +featured: true +--- + +[Scala 3](https://docs.scala-lang.org/scala3/) is the successor of the Scala 2.x +series programming language. + +It's not just a small iteration on Scala 2 but a complete overhaul of the +language trying to improve in several areas like: +* Syntax + * "quiet" syntax for control structures like `if`, `while` and `for` + * optional `new` operator + * Optional braces with significant-indentation syntax like in python + * Completely revised `implicit`s - see below +* Contextual Abstractions focusing on intent instead of mechanics + * Abstracting over contextual information with `using` + * Providing type-class instances via `given` + * direct extension method syntax `extension (s: String) def pirate: String = s"$s arr!"` +* Type System improvements + * `enum`s + * opaque types + * intersection and union types + * dependent function types + * polymorphic function types + * type lambdas + * match types +* Improvements for object oriented design +* Completely new metaprogramming facilities while Scala 2 macros were removed + +Even with these big changes Scala 3 provides a great compatibility story supporting +Scala >2.13.5 libraries in Scala 3 projects and vice versa. + +Although slowly we will update our existing Scala 2 codebase to Scala 3 over the +next months and years to take advantage of the improvements made. \ No newline at end of file