You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/overview.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -14,33 +14,33 @@ The new features address four major concerns:
14
14
Scala 3 also drops a number of features that were used rarely, or where experience showed
15
15
that they tended to cause problems. These are listed separately in the [Dropped Features](http://dotty.epfl.ch/docs) section.
16
16
17
-
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.
17
+
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.
18
18
19
19
<aname="consistency"></a>
20
20
## Consistency
21
21
22
22
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).
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.
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-features/early-initializers.html) syntax.
44
44
45
45
- Generic tuples
46
46
@@ -51,15 +51,15 @@ The primary goal of the language constructs in this section is to make the langu
51
51
52
52
Listed in this section are new language constructs that help precise, typechecked domain modeling and that improve the reliability of refactorings.
Type lambdas were encoded previously in a roundabout way, exploiting
114
114
loopholes in Scala's type system which made it Turing complete. With
115
-
the removal of [unrestricted type projection](dropped/type-projection.html), the loopholes are eliminated, so the
115
+
the removal of [unrestricted type projection](dropped-features/type-projection.html), the loopholes are eliminated, so the
116
116
previous encodings are no longer expressible. Type lambdas in the language provide
117
117
a safe and more ergonomic alternative.
118
118
@@ -134,7 +134,7 @@ The primary goal of the language constructs in this section is to enable high-le
134
134
135
135
([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).
Copy file name to clipboardExpand all lines: docs/docs/typelevel.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -557,7 +557,7 @@ Rewrite methods are a safer alternative to the whitebox macros in Scala 2. Both
557
557
558
558
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.
559
559
560
-
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
560
+
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
561
561
invoking a macro. Quoted code can be inspected using reflection on Tasty trees.
562
562
563
563
To compare: here's the scheme used in Scala-2 to define a macro:
0 commit comments