Skip to content

Fix #5674: Went through individual files and updated reference links #5687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependent function types for methods with dependent result types.

Dependent functions can be implicit, and generalize to arity `N > 22` in the
same way that other functions do, see [the corresponding
documentation](https://dotty.epfl.ch/docs/reference/dropped/limit22.html).
documentation](https://dotty.epfl.ch/docs/reference/dropped-features/limit22.html).

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ insertion of `scala.Function0` around expression in by-name argument position.

Implicit functions generalize to `N > 22` in the same way that functions do,
see [the corresponding
documentation](https://dotty.epfl.ch/docs/reference/dropped/limit22.html).
documentation](https://dotty.epfl.ch/docs/reference/dropped-features/limit22.html).

## Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference/new-types/union-types-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Union Types - More Details"
## Syntax

Syntactically, unions follow the same rules as intersections, but have a lower precedence, see
[Intersection Types - More Details](http://lampepfl.github.io/dotty/docs/reference/intersection-types-spec.html).
[Intersection Types - More Details](http://lampepfl.github.io/dotty/docs/reference/new-types/intersection-types-spec.html).

### Interaction with pattern matching syntax
`|` is also used in pattern matching to separate pattern alternatives and has
Expand Down
22 changes: 11 additions & 11 deletions docs/docs/reference/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ The new features address four major concerns:
Scala 3 also drops a number of features that were used rarely, or where experience showed
that they tended to cause problems. These are listed separately in the [Dropped Features](http://dotty.epfl.ch/docs) section.

Another important set of changes is about meta programming and generative programming. So far these have relied on a [macro system](https://docs.scala-lang.org/overviews/macros/overview.html) that had experimental status. This macro system will be replaced with a different solution that extends [principled meta programming](http://dotty.epfl.ch/docs/reference/principled-meta-programming.html) and [inline](http://dotty.epfl.ch/docs/reference/inline.html) definitions with some reflective capabilities. The current state of the full design and its ramifications for generative programming will be described elsewhere.
Another important set of changes is about meta programming and generative programming. So far these have relied on a [macro system](https://docs.scala-lang.org/overviews/macros/overview.html) that had experimental status. This macro system will be replaced with a different solution that extends [principled meta programming](http://dotty.epfl.ch/docs/reference/other-new-features/principled-meta-programming.html) and [inline](http://dotty.epfl.ch/docs/reference/other-new-features/inline.html) definitions with some reflective capabilities. The current state of the full design and its ramifications for generative programming will be described elsewhere.

<a name="consistency"></a>
## Consistency

The primary goal of the language constructs in this section is to make the language more consistent, both internally, and in relationship to its [foundations](http://www.scala-lang.org/blog/2016/02/03/essence-of-scala.html).

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

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

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

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

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

The result type of a method can refer to its parameters. We now extend the same capability
to the result type of a function.

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

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.
Traits can now have value parameters, just like classes do. This replaces the more complex [early initializer](http://dotty.epfl.ch/docs/reference/dropped-features/early-initializers.html) syntax.

- Generic tuples

Expand All @@ -51,15 +51,15 @@ The primary goal of the language constructs in this section is to make the langu

Listed in this section are new language constructs that help precise, typechecked domain modeling and that improve the reliability of refactorings.

- [Union types](http://dotty.epfl.ch/docs/reference/union-types.html) `A | B`
- [Union types](http://dotty.epfl.ch/docs/reference/new-types/union-types.html) `A | B`

Union types gives fine-grained control over the possible values of a type.
A union type `A | B` states that a value can be an `A` or a `B` without having
to widen to a common supertype of `A` and `B`. Union types thus enable more
precise domain modeling. They are also very useful for interoperating with
Javascript libraries and JSON protocols.

- [Multiversal Equality](http://dotty.epfl.ch/docs/reference/multiversal-equality.html)
- [Multiversal Equality](http://dotty.epfl.ch/docs/reference/other-new-features/multiversal-equality.html)

Multiversal equality is an opt-in way to check that comparisons using `==` and
`!=` only apply to compatible types. It thus removes the biggest remaining hurdle
Expand Down Expand Up @@ -108,11 +108,11 @@ The primary goal of the language constructs in this section is to make common pr
Scala enums will interoperate with the host platform. They support multiversal equality
out of the box, i.e. an enum can only be compared to values of the same enum type.

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

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

Expand All @@ -134,7 +134,7 @@ The primary goal of the language constructs in this section is to enable high-le

([Pending](https://github.com/lampepfl/dotty/pull/4028)) An opaque alias defines a new type `A` in terms of an existing type `T`. Unlike the previous modeling using value classes, opaque types never box. Opaque types are described in detail in [SIP 35](https://docs.scala-lang.org/sips/opaque-types.html).

- [Erased parameters](http://dotty.epfl.ch/docs/reference/erased-terms.html)
- [Erased parameters](http://dotty.epfl.ch/docs/reference/other-new-features/erased-terms.html)

Parameters of methods and functions can be declared `erased`. This means that
the corresponding arguments are only used for type checking purposes and no code
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/release-notes/0.1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ This release ships with the following features:

[1]: https://docs.google.com/document/d/1h3KUMxsSSjyze05VecJGQ5H2yh7fNADtIf3chD3_wr0/edit
[2]: https://infoscience.epfl.ch/record/222780?ln=en
[3]: http://dotty.epfl.ch/docs/reference/intersection-types.html
[4]: http://dotty.epfl.ch/docs/reference/union-types.html
[3]: http://dotty.epfl.ch/docs/reference/new-types/intersection-types.html
[4]: http://dotty.epfl.ch/docs/reference/new-types/union-types.html
[5]: http://dotty.epfl.ch/docs/reference/enums/adts.html
[6]: http://dotty.epfl.ch/docs/reference/enums/desugarEnums.html
[7]: http://dotty.epfl.ch/docs/reference/implicit-by-name-parameters.html
[7]: http://dotty.epfl.ch/docs/reference/other-new-features/implicit-by-name-parameters.html
[8]: https://infoscience.epfl.ch/record/228518
[9]: http://docs.scala-lang.org/sips/pending/static-members.html
[10]: http://docs.scala-lang.org/sips/pending/improved-lazy-val-initialization.html
[11]: http://magarciaepfl.github.io/scala/
[12]: https://github.com/lampepfl/dotty/commit/b2215ed23311b2c99ea638f9d7fcad9737dba588
[13]: https://github.com/lampepfl/dotty/pull/187
[14]: https://github.com/lampepfl/dotty/pull/217
[15]: http://dotty.epfl.ch/docs/reference/trait-parameters.html
[15]: http://dotty.epfl.ch/docs/reference/other-new-features/trait-parameters.html
[16]: https://github.com/lampepfl/dotty/commit/89540268e6c49fb92b9ca61249e46bb59981bf5a
[17]: https://github.com/lampepfl/dotty/pull/174
[18]: https://github.com/lampepfl/dotty/pull/488
Expand All @@ -103,10 +103,10 @@ This release ships with the following features:
[27]: https://github.com/lampepfl/dotty/pull/2513
[28]: https://github.com/lampepfl/dotty/pull/2361
[29]: https://github.com/lampepfl/dotty/pull/1453
[30]: http://dotty.epfl.ch/docs/reference/implicit-function-types.html
[30]: http://dotty.epfl.ch/docs/reference/new-types/implicit-function-types.html
[31]: https://github.com/lampepfl/dotty/pull/2136
[32]: https://github.com/lampepfl/dotty/pull/1758
[33]: http://dotty.epfl.ch/docs/reference/inline.html
[33]: http://dotty.epfl.ch/docs/reference/other-new-features/inline.html

# Contributors
The Dotty team and contributors have closed 750 issues and have merged a total of 1258 pull requests.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/typelevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ Rewrite methods are a safer alternative to the whitebox macros in Scala 2. Both

By contrast, Scala 2 macros mean that user-defined code is invoked to process program fragments as data. The result of this computation is then embedded instead of the macro call. Macros are thus a lot more powerful than rewrite methods, but also a lot less safe.

Functionality analogous to blackbox macros in Scala-2 is available in Scala-3 through its [principled meta programming](https://dotty.epfl.ch/docs/reference/principled-meta-programming.html) system: Code can be turned into data using quotes `(')`. Code-returning computations can be inserted into quotes using splices `(~)`. A splice outside quotes means that the spliced computation is _run_, which is the analogue of
Functionality analogous to blackbox macros in Scala-2 is available in Scala-3 through its [principled meta programming](https://dotty.epfl.ch/docs/reference/other-new-features/principled-meta-programming.html) system: Code can be turned into data using quotes `(')`. Code-returning computations can be inserted into quotes using splices `(~)`. A splice outside quotes means that the spliced computation is _run_, which is the analogue of
invoking a macro. Quoted code can be inspected using reflection on Tasty trees.

To compare: here's the scheme used in Scala-2 to define a macro:
Expand Down