@@ -11,14 +11,14 @@ The Scala 3 Next minors in 2025 Q4 and the next LTS will drop JDK 8 support. We
11
11
12
12
## Immediate motivation
13
13
14
- The recent [ JEP 471 ] ( https://openjdk.org/jeps/471 ) stated that the memory-access
15
- methods in ` sun.misc.Unsafe ` are scheduled for removal in a future release .
16
- Currently, Scala 3 uses ` sun.misc.Unsafe ` in its implementation of lazy values .
17
- This was needed due to compatibility with JDK 8. In order to support JDK 25+, we
14
+ The memory-access methods in ` sun.misc.Unsafe ` are scheduled for removal in a
15
+ future JDK, as stated in the recent [ JEP 471 ] ( https://openjdk.org/jeps/471 ) .
16
+ Currently, Scala 3 uses ` sun.misc.Unsafe ` in its implementation of ` lazy val ` .
17
+ In order to support JDK 25+, we
18
18
will need to drop usage of ` Unsafe ` . We are investigating the required changes
19
19
under [ this issue] ( https://github.com/scala/scala3/issues/9013 ) .
20
20
21
- It also started to dawn on the compiler team that we might consider dropping
21
+ It then started to dawn on the compiler team that we might consider dropping
22
22
support for JDK 8 altogether in a future release of Scala 3.
23
23
24
24
## Long term motivation
@@ -33,11 +33,10 @@ check the current status, take a look at the issues marked with the
33
33
Some of the features that might be interesting to the Scala community are:
34
34
35
35
- [ JEP 181] ( https://github.com/scala/scala3/issues/22292 ) will allow classes
36
- that are logically part of the same code entity, but which are compiled to
37
- distinct class files, to access each other's private members. This is
38
- especially useful for nested classes or companions. Currently, the Scala
36
+ that are logically connected, to access each other's private members. This could
37
+ be useful for representing nested classes and companion objects. (Currently, the Scala
39
38
compiler has to insert public bridge methods to broaden the accessibility of
40
- those members.
39
+ those members.)
41
40
- [ JEP 409] ( https://github.com/scala/scala3/issues/22298 ) introduces sealed
42
41
classes. It would allow the compiler to better represent Scala's sealed trait
43
42
hierarchies.
@@ -53,15 +52,16 @@ authors. They currently have to take into account a large number of different
53
52
versions, both for correctness and performance. Thus, the benefits of this
54
53
change will be felt ecosystem-wide.
55
54
56
- JDK 8 was first published on 18th March 2014, over 10 years ago. JDKs have
57
- advanced greatly through that period . In order to stay competitive, using those
58
- advancements is a must. A lot of the existing distributions, such as
59
- [ Oracle's one ] ( https://www.oracle.com/java/technologies/java-se-support-roadmap.html ) ,
55
+ JDK 8 was first published in 2014, over 10 years ago. JDKs have
56
+ advanced greatly since then . In order to stay competitive, using those
57
+ advancements is a must. A lot of the existing distributions, including
58
+ [ Oracle's own ] ( https://www.oracle.com/java/technologies/java-se-support-roadmap.html ) ,
60
59
have already stopped or will soon stop updating JDK 8 with security and other
61
- fixes. Staying on JDK 8 might directly impact issues within your business
62
- applications.
60
+ fixes. It is of course possible not to update your libraries and compiler version, to
61
+ avoid having to switch to a newer JDK. However, that is highly discouraged,
62
+ as it will make you vulnerable to potential security risks.
63
63
64
- Some larger projects within JVM and Scala ecosystems have already dropped JDK 8
64
+ Some larger projects in the Java and Scala ecosystems have already dropped JDK 8
65
65
support in favor of JDK 11 or even 17.
66
66
67
67
Java examples include:
@@ -92,9 +92,7 @@ Scala examples include:
92
92
- [ Li Haoyi's ecosystem] ( https://github.com/com-lihaoyi ) requires JDK 11 across
93
93
the board
94
94
95
- It is always possible not to update your libraries and compiler version, which
96
- will avoid having to switch to a newer JDK. However, that is highly discouraged,
97
- as it will make you vulnerable to potential security risks.
95
+ This shows that the rest of the industry is already moving away from JDK 8.
98
96
99
97
## Plan for making the switch
100
98
0 commit comments