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/changed-features/interpolation-escapes.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
layout: doc-page
3
-
title: Escapes in interpolations
3
+
title: "Escapes in interpolations"
4
4
---
5
5
6
-
In Scala 2 there was no straightforward way to represent a single quote character `"` in a single quoted interpolation. A `\` character can't be used for that because interpolators themselves decide how to handle escaping, so the parser doesn't know whether the `"` should be escaped or used as a terminator.
6
+
In Scala 2 there is no straightforward way to represent a single quote character `"` in a single quoted interpolation. A `\` character can't be used for that because interpolators themselves decide how to handle escaping, so the parser doesn't know whether the `"` should be escaped or used as a terminator.
7
7
8
-
In Scala 3, you can use the `$` meta character of interpolations to escape a `"` character.
8
+
In Scala 3, we can use the `$` meta character of interpolations to escape a `"` character. Example:
The previous functionality of `App`, which relied on the "magic" [`DelayedInit`](../dropped-features/delayed-init.md) trait, is no longer available. `App` still exists in limited form for now, but it does not support command line arguments and will be deprecated in the future. If programs need to cross-build
87
+
The previous functionality of `App`, which relied on the "magic" [`DelayedInit`](../dropped-features/delayed-init.md) trait, is no longer available. [`App`](https://dotty.epfl.ch/api/scala/App.html) still exists in limited form for now, but it does not support command line arguments and will be deprecated in the future. If programs need to cross-build
88
88
between Scala 2 and Scala 3, it is recommended to use an explicit `main` method with an `Array[String]` argument instead.
Copy file name to clipboardExpand all lines: docs/docs/reference/metaprogramming/macros.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,7 @@ schemes with the familiar string interpolation syntax.
16
16
println(s"Hello, $name, here is the result of 1 + 1 = ${1+1}")
17
17
```
18
18
19
-
In string interpolation we _quoted_ a string and then we _spliced_ into it, two
20
-
others. The first, `name`, is a reference to a value of type `string`, and the
21
-
second is an arithmetic expression that will be _evaluated_ followed by the
22
-
splicing of its string representation.
19
+
In string interpolation we _quoted_ a string and then we _spliced_ into it, two others. The first, `name`, is a reference to a value of type [`String`](https://dotty.epfl.ch/api/scala/Predef$.html#String), and the second is an arithmetic expression that will be _evaluated_ followed by the splicing of its string representation.
23
20
24
21
Quotes and splices in this section allow us to treat code in a similar way,
25
22
effectively supporting macros. The entry point for macros is an inline method
@@ -86,7 +83,7 @@ and it takes types `T` to expressions of type `Type[T]`. Splicing
86
83
takes expressions of type `Expr[T]` to expressions of type `T` and it
87
84
takes expressions of type `Type[T]` to types `T`.
88
85
89
-
The two types can be defined in package `scala.quoted` as follows:
86
+
The two types can be defined in package [`scala.quoted`](https://dotty.epfl.ch/api/scala/quoted.html) as follows:
Note that if we need to run the main (in the example below defined in an object called `Test`) after compilation we need to make the compiler available to the runtime:
Copy file name to clipboardExpand all lines: docs/docs/reference/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ These constructs replace existing constructs with the aim of making the language
48
48
instead of `new` expressions. `new` expressions stay around as a fallback for
49
49
the cases where creator applications cannot be used.
50
50
51
-
With the exception of early initializers and old-style vararg patterns, all superseded constructs continue to be available in Scala 3.0. The plan is to deprecate and phase them out later.
51
+
With the exception of [early initializers](dropped-features/early-initializers.md) and old-style vararg patterns, all superseded constructs continue to be available in Scala 3.0. The plan is to deprecate and phase them out later.
52
52
53
53
Value classes (superseded by opaque type aliases) are a special case. There are currently no deprecation plans for value classes, since we might bring them back in a more general form if they are supported natively by the JVM as is planned by [project Valhalla](https://openjdk.java.net/projects/valhalla/).
0 commit comments