From d9a05be0d454d9433db78187a13f9b6dee2ebfd4 Mon Sep 17 00:00:00 2001 From: "Lan, Jian" Date: Tue, 15 Jun 2021 14:06:23 -0700 Subject: [PATCH] Fix why-scala-3.md --- _overviews/scala3-book/why-scala-3.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_overviews/scala3-book/why-scala-3.md b/_overviews/scala3-book/why-scala-3.md index e6c5b2bd96..ac74de1606 100644 --- a/_overviews/scala3-book/why-scala-3.md +++ b/_overviews/scala3-book/why-scala-3.md @@ -29,7 +29,6 @@ It’s hard to list every benefit of Scala, but a “Top Ten” list might look - ## 1) FP/OOP fusion More than any other language, Scala supports a fusion of the FP and OOP paradigms. @@ -45,7 +44,7 @@ For instance, a `List` is defined as a class---technically it’s an abstract cl val x = List(1, 2, 3) ``` -However, what appears to the programmer to be a simple `List` is actually built from a combination of several specialized types, including abstract classes named `Iterable`, `Seq`, and `LinearSeq`. +However, what appears to the programmer to be a simple `List` is actually built from a combination of several specialized types, including traits named `Iterable`, `Seq`, and `LinearSeq`. Those types are similarly composed of other small, modular units of code. In addition to building a type like `List` from a series of modular traits, the `List` API also consists of dozens of other methods, many of which are higher-order functions: @@ -106,6 +105,7 @@ val b: Password | Username = if (true) name else password ``` + ## 3) Concise syntax Scala is a low ceremony, “concise but still readable” language. For instance, variable declaration is concise: @@ -176,7 +176,6 @@ These capabilities are described in detail in other sections, so see the [Contex - ## 5) Seamless Java integration Scala/Java interaction is seamless in many ways. @@ -357,6 +356,7 @@ Some of the most important features in this category are: {% comment %} A list of types from the Dotty documentation: + - Inferred types - Generics - Intersection types