Skip to content

Commit 091d93f

Browse files
committed
Fix more typos
1 parent bd8065e commit 091d93f

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

docs/docs/reference/overview.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@ The primary goal of the language constructs in this section is to make the langu
2323

2424
- [Intersection types](http://dotty.epfl.ch/docs/reference/intersection-types.html) `A & B`
2525

26-
Replaces compound type `A with B` (the old syntax is kept for the moment but will
26+
They replace compounds type `A with B` (the old syntax is kept for the moment but will
2727
be deprecated in the future). Intersection types are one of the core features of DOT. They
2828
are commutative: `A & B` and `B & A` represent the same type.
2929

30-
- [Implicit function types(http://dotty.epfl.ch/docs/reference/implicit-function-types.html) `implicit A => B`.
30+
- [Implicit function types](http://dotty.epfl.ch/docs/reference/implicit-function-types.html) `implicit A => B`.
3131

3232
Methods and lambdas can have implicit parameters, so it's natural to extend the
3333
same property to function types. Implicit function types help ergonomics and performance
34-
as well. They can replace many uses of monads at an order of magnitude improvement
35-
in runtime speed, and with far better composability.
34+
as well. They can replace many uses of monads, offering better composability and an order of magnitude improvement in runtime speed.
3635

3736
- [Dependent function types](http://dotty.epfl.ch/docs/reference/dependent-function-types.html) `(x: T) => x.S`.
3837

@@ -41,14 +40,13 @@ The primary goal of the language constructs in this section is to make the langu
4140

4241
- [Trait parameters](http://dotty.epfl.ch/docs/reference/trait-parameters.html) `trait T(x: S)`
4342

44-
Trait can now have value parameters, just like classes do. This replaces the cumbersome
45-
[early initializer](http://dotty.epfl.ch/docs/reference/dropped/early-initializers.html) syntax.
43+
Traits can now have value parameters, just like classes do. This replaces the more complex [early initializer](http://dotty.epfl.ch/docs/reference/dropped/early-initializers.html) syntax.
4644

4745
- [Type lambdas](http://dotty.epfl.ch/docs/reference/type-lambdas.html) `[X] => C[X]`
4846

49-
Type lambdas were encoded previously in an extremely roundabout way, exploiting
50-
loopholes in Scala's type system which made it Turing complete and unsound. With
51-
the removal of unrestricted type projection the loopholes are eliminated, so the
47+
Type lambdas were encoded previously in a roundabout way, exploiting
48+
loopholes in Scala's type system which made it Turing complete. With
49+
the removal of [unrestricted type projection](dropped/type-projection.html), the loopholes are eliminated, so the
5250
previous encodings are no longer expressible. Type lambdas in the language provide
5351
a safe and more ergonomic alternative.
5452

@@ -67,8 +65,8 @@ Listed in this section are new language constructs that help precise, typechecke
6765

6866
- [Multiversal Equality](http://dotty.epfl.ch/docs/reference/multiversal-equality.html)
6967

70-
Multiversal equality is an opt in way to check that comparisons using `==` and
71-
`!=` only apply to compatible types. It thus closes the biggest remaining hurdle
68+
Multiversal equality is an opt-in way to check that comparisons using `==` and
69+
`!=` only apply to compatible types. It thus removes the biggest remaining hurdle
7270
to type-based refactoring. Normally, one would wish that one could change the type
7371
of some value or operation in a large code base, fix all type errors, and obtain
7472
at the end a working program. But universal equality `==` works for all types.
@@ -90,8 +88,8 @@ Listed in this section are new language constructs that help precise, typechecke
9088
are not tracked. We want to put in the hooks to allow to change this over time. The idea
9189
is to treat effects as capabilities represented as implicit parameters. Some effect types
9290
will be defined by the language, others can be added by libraries. Initially, the language
93-
will likely only cover exceptions as effect capabilities, but it can be extended later
94-
to mutations and possibly other effects. To ensure backwards compatibility, all effect
91+
will likely only cover exceptions as effect capabilities, but this can be extended later
92+
to mutations and other effects. To ensure backwards compatibility, all effect
9593
capabilities are initially available in `Predef`. Un-importing effect capabilities from
9694
`Predef` will enable stricter effect checking, and provide stronger guarantees of purity.
9795

@@ -103,9 +101,8 @@ The primary goal of the language constructs in this section is to make common pr
103101
- [Enums](http://dotty.epfl.ch/docs/reference/enums/enums.html) `enum Color { case Red, Green, Blue }`
104102

105103
Enums give a simple way to express a type with a finite set of named values. They
106-
are found in most languages. The previous encodings of enums in Scala were all had
107-
problems that prevented universal adoption. The new native `enum` construct in Scala
108-
is quite flexible; among others it gives a more concise way to write [algebraic data types](http://dotty.epfl.ch/docs/reference/enums/adts.html),
104+
are found in most languages. The previous encodings of enums as library-defined types
105+
were not fully satisfactory and consequently were used widely. The new native `enum` construct in Scala is quite flexible; among others it gives a more concise way to write [algebraic data types](http://dotty.epfl.ch/docs/reference/enums/adts.html),
109106
which would otherwise be expressed by a sealed base trait with case classes as alternatives.
110107
Scala enums will interoperate with the host platform. They support multiversal equality
111108
out of the box, i.e. an enum can only be compared to values of the same enum type.
@@ -133,6 +130,5 @@ The primary goal of the language constructs in this section is to enable high-le
133130
Parameters of methods and functions can be declared `erased`. This means that
134131
the corresponding arguments are only used for type checking purposes and no code
135132
will be generated for them. Typical candidates for erased parameters are type
136-
constraints impressed through implicits such as `=:=` and `<:<`. Erased parameters
137-
help both runtime (since no argument has to be constructed) and compile time
138-
(since potentially large arguments can be eliminated early).
133+
constraints such as `=:=` and `<:<` that are expressed through implicits.
134+
Erased parameters improve both run times (since no argument has to be constructed) and compile times (since potentially large arguments can be eliminated early).

0 commit comments

Comments
 (0)