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
New Scala language features or standard library APIs are initially introduced as experimental, but once they become fully implemented and acceppted by the [SIP](https://docs.scala-lang.org/sips/) these can become a preview features.
8
8
Preview language features and APIs are guaranteed to be standarized in some next Scala minor release, but allow compiler team to introduce small, possibly binary incompatible, changes based on the community feedback.
9
-
These can be used by early adopters who can accept possibility of binary compatibility breakage. As an example these can be used for project internal tools and applications, but are discouraged to be used by libraries.
9
+
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.
10
10
11
-
Users can enable access to preview features and definitions by compiling with `-preview` flag. The flag would enable all preview features and definitions. There is no way for enabling only a subset of preview features.
11
+
Users can enable access to preview features and definitions by compiling with the `-preview` flag. The flag would enable all preview features and definitions. There is no scheme for enabling only a subset of preview features.
12
12
13
-
The biggest difference of preview features when compared with experimental features is their non-viral behaviour.
14
-
Any defintion compiled in the preview mode (using `-preview` flag) is not marked as preview defintion itself.
13
+
The biggest difference of preview features compared to experimental features is their non-viral behaviour.
14
+
A definition compiled in preview mode (using the `-preview` flag) is not marked as a preview definition itself.
15
15
This behaviour allows to use preview features transitively in other compilation units without explicitlly enabled preview mode, as long as it does not directly reference APIs or features marked as preview.
16
16
17
-
The [`@preview`](https://scala-lang.org/api/3.x/scala/annotation/internal/preview.html)annotations are used to mark Scala 3 standard library APIs currently available under enabled preview mode.
18
-
The definitions follows similar rules as the[`@experimental`](https://scala-lang.org/api/3.x/scala/annotation/experimental.html) when it comes to accessing, subtyping, overriding or overloading definitions marked with this annotation - all of these can only be performed in compilation unit that enables preview mode.
17
+
The [`@preview`](https://scala-lang.org/api/3.x/scala/annotation/internal/preview.html)annotation is used to mark Scala 3 standard library APIs currently available under preview mode.
18
+
The rules for `@preview` are similar to[`@experimental`](https://scala-lang.org/api/3.x/scala/annotation/experimental.html) when it comes to accessing, subtyping, overriding or overloading definitions marked with this annotation - all of these can only be performed in compilation units that enable preview mode.
0 commit comments