Skip to content

Commit 995f8c6

Browse files
committed
docs: apply suggestions from review
1 parent 295dbff commit 995f8c6

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

_posts/2025-02-01-next-scala-lts.md

+26-12
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ by: Tomasz Godzik
77

88
**TLDR;**
99

10-
sun.misc.Unsafe, re-used in lazy val implementation, will be removed in a future
11-
JDK one of the Scala 3 Next minors in 2025 Q4 and the next LTS will drop JDK 8
12-
support
10+
API used in lazy val implementation, will be removed in a future JDK thus one of
11+
the Scala 3 Next minors in 2025 Q4 and the next LTS will drop JDK 8 support.
1312

1413
## Intro
1514

1615
For the compiler’s second LTS version, the Scala 3 compiler team will be
1716
dropping support for JDK 8 and is considering which later JDK to use.
1817

19-
## Reasons for the change
18+
## Immediate motivation
2019

2120
One of the main reasons is that recent [JEP 471](https://openjdk.org/jeps/471)
2221
stated that the memory-access methods in sun.misc.Unsafe are scheduled for
@@ -28,18 +27,33 @@ which is being investigated under
2827
dawn on the compiler team that we might consider stopping to support JDK 8
2928
altogether in a future release of Scala 3.
3029

31-
## Advantages
30+
## Long term motivation
3231

3332
Switching to a newer version of the JDK would allow both the compiler and the
34-
Scala ecosystem to start using new features brought in by JDK 9+. This might
35-
include a number of JEPs, which will be investigated by the team the coming
36-
year. To check the current status take a look at the issues marked with the
33+
Scala ecosystem to start using new features and standard library improvements
34+
brought in by JDK 9+. This might include a number of JEPs, which will be
35+
investigated by the team the coming year. To check the current status take a
36+
look at the issues marked with the
3737
[JEP label](https://github.com/scala/scala3/issues?q=is%3Aissue+is%3Aopen+label%3Acompat%3Ajava%3Ajep).
3838

39+
Some of the features that might be interesting to the Scala community are:
40+
41+
- [JEP 181](https://github.com/scala/scala3/issues/22292) will allow classes
42+
that are logically part of the same code entity, but which are compiled to
43+
distinct class files, to access each other's private members without the need
44+
for Scala compiler to insert accessibility-broadening bridge methods. This is
45+
especially useful for nested classes or companions.
46+
- [JEP 334](https://github.com/scala/scala3/issues/22294) introduce an API to
47+
model nominal descriptions of key class-file and run-time artifacts, which can
48+
potentially help improve the internals of Scala 3 compiler.
49+
- [JEP 471](https://github.com/scala/scala3/issues/9013) which adds a new API
50+
for memory access, which can be used to replace the usage of sun.misc.Unsafe
51+
in Scala 3.
52+
3953
Another advantage would be reducing the maintenance burden on tooling and
4054
library authors that currently have to take into account a large number of
4155
different versions to test and make sure that their code is performant on all of
42-
them.
56+
them. Thus, the benefits of this change will be felt ecosystem-wide.
4357

4458
If we take a look at the timeline we'll see that JDK 8 was first published on
4559
18th March 2014, which is already over 10 years ago. Technology and especially
@@ -71,10 +85,10 @@ If you are using Scala 3 on JDK 8 do let us know! However the current line of
7185
LTS under 3.3.x will be supported for at least another year after the release of
7286
the next LTS version, which should give you plenty of time to migrate.
7387

74-
If at any point it turns out it's not possible for you to switch, be sure to
75-
send us your feedback.
88+
If it's not possible for you to switch, be sure to send us your feedback so that
89+
we can figure out a way to help you migrate.
7690

77-
## Summary
91+
## Discussions and further reading
7892

7993
You can track the current work related to lazy values under
8094
[this issue](https://github.com/scala/scala3/issues/9013) and discuss the topic

0 commit comments

Comments
 (0)