A quiet, attractive new programming language (Scala 3)

Here’s some source code that demonstrates a quiet, concise, and attractive new programming language I’d enjoy using:

Scala 3 (Dotty), September 30, 2019

As you might have guessed, that source code demonstrates the latest features from the Scala 3 (Dotty) programming language.

Correction: new Person can be written as just Person.

(I should probably mention that there’s nothing special about that “main” method; I was just trying to show a few new Dotty features.)

Compared to Scala 2

It might take a little while to get used to that code if you’re used to Scala 2, but when you compare it to similar Scala 2 code, it makes you realize how “noisy” Scala 2 is, even though it’s already a concise language:

Scala 2 example (September, 2019)

Speaking for myself, this new proposed syntax makes me realize how “loud” and unnecessary all those curly braces are.

Scala 2 & 3, side-by-side

If you want to see the two languages side-by-side, click this image to see a larger version of it in a new window:

Scala 2 and 3, side by side

About the new Scala 3 (Dotty) features

For more information about the Scala 3 features shown above, see the EPFL Announcing Dotty 0.19.0-RC1 announcement (from September 23, 2019).

Also, to pitch in on the conversation about Scala 3 and Dotty, join the discussion at contributors.scala-lang.org.