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
Starting in Scala `3.7`, the usability of `for`-comprehensions is improved.
7
+
Starting in Scala `3.7` under `-preview` mode, the usability of `for`-comprehensions is improved.
8
8
9
9
The biggest user facing change is the new ability to start `for`-comprehensions with aliases. This means that the following previously invalid code is now valid:
New Scala language features or standard library APIs are initially introduced as experimental, but once they become fully implemented and accepted by the [SIP](https://docs.scala-lang.org/sips/) these can become a preview features.
11
+
Preview language features and APIs are guaranteed to be standardized in some next Scala minor release, but allow the compiler team to introduce small, possibly binary incompatible, changes based on the community feedback.
12
+
These can be used by early adopters who can accept the possibility of binary compatibility breakage. For instance, preview features could be used in some internal tool or application. On the other hand, preview features are discouraged in publicly available libraries.
13
+
More information about preview featues can be found in [../other-new-features/preview-defs.md](preview defintions guide)
14
+
15
+
## List of available preview features
16
+
17
+
*[`better-fors`](./better-fors.md): Enables new for-comprehension behaviour under SIP-62 under `-source:3.7` or later
18
+
19
+
### `-preview` compiler flag
20
+
21
+
This flag enables the use of all preview language feature in the project.
0 commit comments