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
We're happy to announce the next minor release of Scala - 3.6.0 is finally out!
9
+
We're happy to announce the next minor release of Scala - 3.6.2 is finally out!
10
10
11
-
# What’s new in 3.6.0?
11
+
# What’s new in Scala 3.6?
12
12
13
13
Besides multiple bugfixes, this release stabilises multiple experimental features introduced to Scala language after careful review and acceptance by the [Scala Improvement Proposal's Commitee](https://docs.scala-lang.org/sips/). Many of these changes can have a significant impact on the Scala syntax and are introducing new amazing possibilities in writing concise, typesafe as well as easier, and easier to maintain code.
14
14
@@ -72,11 +72,11 @@ case class City(zipCode: Int, name: String)
72
72
assert(query.zipCode.isEmpty)
73
73
```
74
74
75
-
You can read more about named tuples in the [dedicated section of Scala 3 reference documentation](https://scala-lang.org/api/3.6.0/docs/docs/reference/other-new-features/named-tuples.html).
75
+
You can read more about named tuples in the [dedicated section of Scala 3 reference documentation](https://scala-lang.org/api/3.6.2/docs/docs/reference/other-new-features/named-tuples.html).
76
76
77
77
## SIP-62 - For-Comprehension Improvements
78
78
79
-
Starting with Scala 3.6.0 you can take advantage of improvements to the for-comprehesnions syntax.
79
+
Starting with Scala 3.6.2 you can take advantage of improvements to the for-comprehesnions syntax.
80
80
Major user-facing improvement introduced by [SIP-62](https://docs.scala-lang.org/sips/better-fors.html) is the ability to start a for-comprehension block with aliases:
81
81
82
82
```scala
@@ -147,13 +147,13 @@ class Set[T] extends Collection:
147
147
overridegivenOrder[Element] =???// custom implementation provided by the user
148
148
```
149
149
150
-
See the updated [Contextual Abstractions](https://scala-lang.org/api/3.6.0/docs/docs/reference/contextual/givens.html) chapter of the Scala 3 reference guide to learn more about these changes.
150
+
See the updated [Contextual Abstractions](https://scala-lang.org/api/3.6.2/docs/docs/reference/contextual/givens.html) chapter of the Scala 3 reference guide to learn more about these changes.
151
151
152
152
_**Note**: It is important not to confuse changes under SIP-64 with the [experimental modularity improvements](https://dotty.epfl.ch/docs/reference/experimental/typeclasses.html) available under `-language:experimental.modularity` and `-source:future`. These changes are still being developed in the experimental phase and would require SIP committee acceptance before stabilisation.
153
153
154
154
## SIP-56 Amendment: Match types extractors follow aliases and singletons
155
155
156
-
Scala 3.6.0 also stabilises the improvements of match types previously available under `-language:experimental.betterMatchTypeExtractors`. These changes were amending the match type specification and adjusting the implementation of match types under [SIP-56](https://docs.scala-lang.org/sips/match-types-spec.html) to resolve some of the issues reported by users. Under the new rules, it is possible to correctly resolve aliases and singleton types.
156
+
Scala 3.6 also stabilises the improvements of match types previously available under `-language:experimental.betterMatchTypeExtractors`. These changes were amending the match type specification and adjusting the implementation of match types under [SIP-56](https://docs.scala-lang.org/sips/match-types-spec.html) to resolve some of the issues reported by users. Under the new rules, it is possible to correctly resolve aliases and singleton types.
157
157
158
158
```scala
159
159
traitA:
@@ -188,7 +188,7 @@ val Some(appVersion) = config.get("appVersion").runtimeChecked
188
188
189
189
## Switch mapping of context bounds to using clauses
190
190
191
-
Until Scala 3.6.0 context bound parameters were always desugared to `implicit` arguments, starting with 3.6.0 these would be mapped to `using` parameters instead.
191
+
Until Scala 3.6 context bound parameters were always desugared to `implicit` arguments, starting with Scala 3.6 these would be mapped to `using` parameters instead.
192
192
This change should not affect the majority of users, however, it can lead to differences in how implicits are resolved.
193
193
Resolution of implicits can slightly differ depending on whether we're requesting them using `implicit` or `using` parameter, or depending on whether they were defined using `implicit` or `given` keywords. The special behaviours were introduced to smoothen migration from Scala 2 to brand new implicits resolution in Scala 3.
194
194
This change might also affect some of the projects that use compiler plugins or macros to inspect the implicit argument lists of the function calls - these might require some minor fixes, eg. when filtering symbols by their flags.
@@ -199,7 +199,7 @@ This change might also affect some of the projects that use compiler plugins or
199
199
200
200
In the [Scala 3.5.0 release notes](https://scala-lang.org/blog/2024/08/22/scala-3.5.0-released.html) we've announced upcoming changes to givens, due to their peculiar problem with prioritization. Currently, the compiler always tries to select the instance with the most specific subtype of the requested type. In the future, it would change to always selecting the instance with the most general subtype that satisfies the context-bound.
201
201
202
-
Starting from Scala 3.6.0, code whose behaviour can differ between new and old rules (ambiguity on new, passing on old, or vice versa) will emit warnings, but the old rules will still be applied.
202
+
Starting from Scala 3.6, code whose behaviour can differ between new and old rules (ambiguity on new, passing on old, or vice versa) will emit warnings, but the old rules will still be applied.
203
203
Running the compiler with `-source:3.5` will allow you to temporarily keep using the old rules; with `-source:3.7` or `-source:future` the new scheme will be used.
204
204
205
205
For the detailed motivation of changes with examples of code that will be easier to write and understand, see our recent blog post - [Upcoming Changes to Givens in Scala 3.7]({{ site.baseurl }}/2024/08/19/given-priority-change-3.7.html).
@@ -217,7 +217,7 @@ Let's take the following example:
217
217
```
218
218
219
219
Reordering the fields is binary-compatible but it might affect the meaning of `@Annotation(1)`
220
-
Starting from Scala 3.6.0, named arguments are required for Java-defined annotations.
220
+
Starting from Scala 3.6, named arguments are required for Java-defined annotations.
221
221
The compiler can provide you with automatic rewrites introducing now required names, using `-source:3.6-migration, -rewrite` flags. The rewrites are done on a best-effort basis and should be inspected for correctness by the users.
222
222
223
223
# What’s next?
@@ -227,6 +227,6 @@ The compiler can provide you with automatic rewrites introducing now required na
227
227
228
228
Thank you to all the contributors who made this release possible 🎉
229
229
230
-
According to git shortlog -sn --no-merges 3.5.2..3.6.0 these are:
230
+
According to git shortlog -sn --no-merges 3.5.2..3.6.2 these are:
0 commit comments