Skip to content

Add Scala 3.6.2 announcement #1699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Dec 10, 2024
Merged

Add Scala 3.6.2 announcement #1699

merged 15 commits into from
Dec 10, 2024

Conversation

WojciechMazur
Copy link
Contributor

No description provided.


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.

## SIP-47 - Clause Interleaving
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjrd Can I ask you for a technical review or some improvements, as you're one of the SIP authors

}
```

## SIP-58 - Named Tuples
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odersky Can I ask you for a technical review or some improvements, as you're the author of these changes?


It also introduces changes to how your code is desugared by the compiler to `map` method calls, leading to a more optimized code by removing redundant calls where possible.

## SIP-64 - Improve Syntax for Context Bounds and Givens
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odersky Can I ask you for a technical review or some improvements, as you're the main author of these changes?

…s, make named tuples example less controversial
@SethTisue SethTisue changed the title Add Scala 3.6.0 announcement Add Scala 3.6.2 announcement Oct 28, 2024
@WojciechMazur WojciechMazur marked this pull request as ready for review December 10, 2024 12:08
```

Reordering the fields is binary-compatible but it might affect the meaning of `@Annotation(1)`
Starting from Scala 3.6, named arguments are required for Java-defined annotations that define multiple parameters. Java defined annotations with a single parameter named `value` can still be used anonymously.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wording seems to suggest that annotations are supposed to be used anonymously rather than their arguments, which is slightly confusing. Also I think unnamed would be clearer than anonymous in this context.
And actually unnamed arguments might also work for annotations with multiple parameters given that only one argument is passed to the annotation's 'pseudo-constructor' (the one corresponding to value parameter) and the other parameters have a default value. e.g.

import java.lang.annotation.*;

public @interface MyAnnot {
    String value();
    String value2() default "default";
}
@MyAnnot("abc")
class Foo

Just please pick some better names if you're going to reuse this example 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you this example might be confusing to reader? In this case depening on number of used parameters in the example you might skip names if only 1 param is used, or all required to name all of them to otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it might be usefull to explain the rules better, I've updated the example

@WojciechMazur WojciechMazur merged commit 86b911a into main Dec 10, 2024
1 check passed
@WojciechMazur WojciechMazur deleted the release/3.6.0 branch December 10, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants