diff --git a/.github/workflows/sync-sips.yml b/.github/workflows/sync-sips.yml new file mode 100644 index 0000000000..cdcc7e8fe6 --- /dev/null +++ b/.github/workflows/sync-sips.yml @@ -0,0 +1,42 @@ +name: Sync SIPs + +on: + schedule: + - cron: '0 6 * * *' # Daily at 6 AM UTC + workflow_dispatch: # Allow manual trigger + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Fetch SIPs from improvement-proposals + run: | + rm -rf _sips/sips + mkdir -p _sips/sips + git clone --depth 1 --filter=blob:none --sparse https://github.com/scala/improvement-proposals.git /tmp/improvement-proposals + cd /tmp/improvement-proposals + git sparse-checkout set content + cp -r content/* $GITHUB_WORKSPACE/_sips/sips/ + + - name: Check for changes + id: changes + run: | + git add _sips/sips + if git diff --staged --quiet; then + echo "changed=false" >> $GITHUB_OUTPUT + else + echo "changed=true" >> $GITHUB_OUTPUT + fi + + - name: Create Pull Request + if: steps.changes.outputs.changed == 'true' + uses: peter-evans/create-pull-request@v5 + with: + commit-message: "Sync SIPs from scala/improvement-proposals" + title: "Sync SIPs from scala/improvement-proposals" + body: | + Automated sync of SIP content from [scala/improvement-proposals](https://github.com/scala/improvement-proposals). + branch: sync-sips + delete-branch: true diff --git a/_layouts/root-content-layout.html b/_layouts/root-content-layout.html index b45513d346..31c9b14ae7 100644 --- a/_layouts/root-content-layout.html +++ b/_layouts/root-content-layout.html @@ -20,7 +20,7 @@ {% else %}
 
{% endif %} -

{{ page.title }}

+

{% if page.layout == 'sip' and page.number %}{{ page.kind | default: 'SIP' }}-{{ page.number }} - {% endif %}{{ page.title }}

-## Rejected SIPs +## Pending SIPs -Proposals that have been rejected by the committee. Click on a proposal to read the -corresponding discussions on GitHub. +For proposals that are at the design or implementation stage, and that are actively +discussed by the committee and the proposals' authors, please +refer to the [GitHub PR queue](https://github.com/scala/improvement-proposals/pulls?q=is%3Apr+is%3Aopen). -
- -
+## Rejected SIPs + +Please refer to [GitHub](https://github.com/scala/improvement-proposals/pulls?q=is%3Apr+label%3Astatus%3Arejected) for proposals that have been rejected by the committee and the corresponding discussions. ## Withdrawn SIPs -Proposals that have been withdrawn by their authors. Click on a proposal to read the -corresponding discussions on GitHub. +Please refer to [GitHub](https://github.com/scala/improvement-proposals/pulls?q=is%3Apr+label%3Astatus%3Awithdrawn) for proposals that have been withdrawn +and the corresponding discussions. -
- -
+## Pre-SIP Discussions + +You can find so-called “pre-SIP discussions” in the Scala Contributors forum, under +the category [Scala Improvement Process](https://contributors.scala-lang.org/c/sip/13). +The goal of pre-SIP discussions is to gather initial community feedback and support. \ No newline at end of file diff --git a/_sips/sips/named-and-default-arguments.md b/_sips/sips/001-named-and-default-arguments.md similarity index 99% rename from _sips/sips/named-and-default-arguments.md rename to _sips/sips/001-named-and-default-arguments.md index 3d56605ad7..f088d157bb 100644 --- a/_sips/sips/named-and-default-arguments.md +++ b/_sips/sips/001-named-and-default-arguments.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-1 Named and Default Arguments -stage: completed -status: shipped +number: 1 permalink: /sips/:title.html redirect_from: /sips/pending/named-and-default-arguments.html +stage: completed +status: shipped +title: Named and Default Arguments --- **Lukas Rytz** diff --git a/_sips/sips/scala-compiler-phase-plugin-in.md b/_sips/sips/002-scala-compiler-phase-plugin-in.md similarity index 72% rename from _sips/sips/scala-compiler-phase-plugin-in.md rename to _sips/sips/002-scala-compiler-phase-plugin-in.md index 24f0330e91..24c330db73 100644 --- a/_sips/sips/scala-compiler-phase-plugin-in.md +++ b/_sips/sips/002-scala-compiler-phase-plugin-in.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-2 Scala Compiler Phase and Plug-In Initialization for Scala 2.8 -stage: completed -status: shipped +number: 2 permalink: /sips/:title.html redirect_from: /sips/pending/scala-compiler-phase-plugin-in.html +stage: completed +status: shipped +title: Scala Compiler Phase and Plug-In Initialization for Scala 2.8 --- This was an older SID that can be found [here](https://www.scala-lang.org/sid/2) diff --git a/_sips/sips/new-collection-classes.md b/_sips/sips/003-new-collection-classes.md similarity index 81% rename from _sips/sips/new-collection-classes.md rename to _sips/sips/003-new-collection-classes.md index d8bb9b8047..e6b593260a 100644 --- a/_sips/sips/new-collection-classes.md +++ b/_sips/sips/003-new-collection-classes.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-3 - New Collection classes -stage: completed -status: shipped +number: 3 permalink: /sips/:title.html redirect_from: /sips/pending/new-collection-classes.html +stage: completed +status: shipped +title: New Collection classes --- This was an older SID that can be found [here](https://www.scala-lang.org/sid/3) diff --git a/_sips/sips/early-member-definitions.md b/_sips/sips/004-early-member-definitions.md similarity index 81% rename from _sips/sips/early-member-definitions.md rename to _sips/sips/004-early-member-definitions.md index 244b7c15b3..2f5049c0a5 100644 --- a/_sips/sips/early-member-definitions.md +++ b/_sips/sips/004-early-member-definitions.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-4 - Early Member Definitions -stage: completed -status: shipped +number: 4 permalink: /sips/:title.html redirect_from: /sips/pending/early-member-definitions.html +stage: completed +status: shipped +title: Early Member Definitions --- This was an older SID that can be found [here](https://www.scala-lang.org/sid/4) diff --git a/_sips/sips/internals-of-scala-annotations.md b/_sips/sips/005-internals-of-scala-annotations.md similarity index 79% rename from _sips/sips/internals-of-scala-annotations.md rename to _sips/sips/005-internals-of-scala-annotations.md index 792f7ee8ee..32d0e822d8 100644 --- a/_sips/sips/internals-of-scala-annotations.md +++ b/_sips/sips/005-internals-of-scala-annotations.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-5 - Internals of Scala Annotations -stage: completed -status: shipped +number: 5 permalink: /sips/:title.html redirect_from: /sips/pending/internals-of-scala-annotations.html +stage: completed +status: shipped +title: Internals of Scala Annotations --- This was an older SID that can be found [here](https://www.scala-lang.org/sid/5) diff --git a/_sips/sips/scala-2-8-arrays.md b/_sips/sips/007-scala-2-8-arrays.md similarity index 99% rename from _sips/sips/scala-2-8-arrays.md rename to _sips/sips/007-scala-2-8-arrays.md index 7f5999d651..864e6582a5 100644 --- a/_sips/sips/scala-2-8-arrays.md +++ b/_sips/sips/007-scala-2-8-arrays.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-7 - Scala 2.8 Arrays -stage: completed -status: shipped +number: 7 permalink: /sips/:title.html redirect_from: /sips/pending/scala-2-8-arrays.html +stage: completed +status: shipped +title: Scala 2.8 Arrays --- *(This is an older SID, its original PDF can be found [here](https://www.scala-lang.org/sid/7))* diff --git a/_sips/sips/scala-swing-overview.md b/_sips/sips/008-scala-swing-overview.md similarity index 82% rename from _sips/sips/scala-swing-overview.md rename to _sips/sips/008-scala-swing-overview.md index a539dc352c..b3f4d1829f 100644 --- a/_sips/sips/scala-swing-overview.md +++ b/_sips/sips/008-scala-swing-overview.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-8 - Scala Swing Overview -stage: completed -status: shipped +number: 8 permalink: /sips/:title.html redirect_from: /sips/pending/scala-swing-overview.html +stage: completed +status: shipped +title: Scala Swing Overview --- This was an older SID that can be found [here](https://www.scala-lang.org/sid/8) diff --git a/_sips/sips/scala-specialization.md b/_sips/sips/009-scala-specialization.md similarity index 82% rename from _sips/sips/scala-specialization.md rename to _sips/sips/009-scala-specialization.md index d9bd06e36e..120f6084cb 100644 --- a/_sips/sips/scala-specialization.md +++ b/_sips/sips/009-scala-specialization.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-9 - Scala Specialization -stage: completed -status: shipped +number: 9 permalink: /sips/:title.html redirect_from: /sips/pending/scala-specialization.html +stage: completed +status: shipped +title: Scala Specialization --- This was an older SID that can be found [here](https://www.scala-lang.org/sid/9) diff --git a/_sips/sips/picked-signatures.md b/_sips/sips/010-picked-signatures.md similarity index 73% rename from _sips/sips/picked-signatures.md rename to _sips/sips/010-picked-signatures.md index 12f205a4e1..16fcf11f4a 100644 --- a/_sips/sips/picked-signatures.md +++ b/_sips/sips/010-picked-signatures.md @@ -1,10 +1,12 @@ --- +kind: SID layout: sip -title: SID-10 - Storage of pickled Scala signatures in class files -stage: completed -status: shipped +number: 10 permalink: /sips/:title.html redirect_from: /sips/pending/picked-signatures.html +stage: completed +status: shipped +title: Storage of pickled Scala signatures in class files --- This was an older SID that can be found [here](https://www.scala-lang.org/sid/10) diff --git a/_sips/sips/string-interpolation.md b/_sips/sips/011-string-interpolation.md similarity index 85% rename from _sips/sips/string-interpolation.md rename to _sips/sips/011-string-interpolation.md index f1343fdb22..1332d4a004 100644 --- a/_sips/sips/string-interpolation.md +++ b/_sips/sips/011-string-interpolation.md @@ -1,11 +1,11 @@ --- layout: sip -title: SIP-11 - String Interpolation +number: 11 +permalink: /sips/string-interpolation.html +redirect_from: /sips/pending/string-interpolation.html stage: completed status: shipped -vote-status: complete -permalink: /sips/:title.html -redirect_from: /sips/pending/string-interpolation.html +title: String Interpolation --- **By: Martin Odersky** diff --git a/_sips/sips/implicit-classes.md b/_sips/sips/013-implicit-classes.md similarity index 98% rename from _sips/sips/implicit-classes.md rename to _sips/sips/013-implicit-classes.md index 495bcadf23..56e6e4886a 100644 --- a/_sips/sips/implicit-classes.md +++ b/_sips/sips/013-implicit-classes.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-13 - Implicit classes -stage: completed -status: shipped +number: 13 permalink: /sips/:title.html redirect_from: /sips/pending/implicit-classes.html +stage: completed +status: shipped +title: Implicit classes --- **By: Josh Suereth** diff --git a/_sips/sips/futures-promises.md b/_sips/sips/014-futures-promises.md similarity index 99% rename from _sips/sips/futures-promises.md rename to _sips/sips/014-futures-promises.md index 26e067bfaa..460bc15540 100644 --- a/_sips/sips/futures-promises.md +++ b/_sips/sips/014-futures-promises.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-14 - Futures and Promises -stage: completed -status: shipped +number: 14 permalink: /sips/:title.html redirect_from: /sips/pending/futures-promises.html +stage: completed +status: shipped +title: Futures and Promises --- **By: Philipp Haller, Aleksandar Prokopec, Heather Miller, Viktor Klang, Roland Kuhn, and Vojin Jovanovic** diff --git a/_sips/sips/value-classes.md b/_sips/sips/015-value-classes.md similarity index 99% rename from _sips/sips/value-classes.md rename to _sips/sips/015-value-classes.md index 48ad643281..e8956533ca 100644 --- a/_sips/sips/value-classes.md +++ b/_sips/sips/015-value-classes.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-15 - Value Classes -stage: completed -status: shipped +number: 15 permalink: /sips/:title.html redirect_from: /sips/pending/value-classes.html +stage: completed +status: shipped +title: Value Classes --- **By: Martin Odersky and Jeff Olson and Paul Phillips and Joshua Suereth** diff --git a/_sips/sips/type-dynamic.md b/_sips/sips/017-type-dynamic.md similarity index 94% rename from _sips/sips/type-dynamic.md rename to _sips/sips/017-type-dynamic.md index c359ec0627..ac31d4cbbd 100644 --- a/_sips/sips/type-dynamic.md +++ b/_sips/sips/017-type-dynamic.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-17 - Type Dynamic -stage: completed -status: shipped +number: 17 permalink: /sips/:title.html redirect_from: /sips/pending/type-dynamic.html +stage: completed +status: shipped +title: Type Dynamic --- diff --git a/_sips/sips/modularizing-language-features.md b/_sips/sips/018-modularizing-language-features.md similarity index 94% rename from _sips/sips/modularizing-language-features.md rename to _sips/sips/018-modularizing-language-features.md index 4de88d18be..9c27ac2ce9 100644 --- a/_sips/sips/modularizing-language-features.md +++ b/_sips/sips/018-modularizing-language-features.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-18 - Modularizing Language Features -stage: completed -status: shipped +number: 18 permalink: /sips/:title.html redirect_from: /sips/pending/modularizing-language-features.html +stage: completed +status: shipped +title: Modularizing Language Features --- diff --git a/_sips/sips/42.type.md b/_sips/sips/023-42.type.md similarity index 99% rename from _sips/sips/42.type.md rename to _sips/sips/023-42.type.md index 861505d42e..11160ccaa5 100644 --- a/_sips/sips/42.type.md +++ b/_sips/sips/023-42.type.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-23 - Literal-based singleton types -stage: completed -status: shipped +number: 23 permalink: /sips/:title.html redirect_from: /sips/pending/42.type.html +stage: completed +status: shipped +title: Literal-based singleton types --- **Authors: George Leontiev, Eugene Burmako, Jason Zaugg, Adriaan Moors, Paul Phillips, Oron Port, Miles diff --git a/_sips/sips/trait-parameters.md b/_sips/sips/025-trait-parameters.md similarity index 96% rename from _sips/sips/trait-parameters.md rename to _sips/sips/025-trait-parameters.md index 633f0c0b73..f8ad666eee 100644 --- a/_sips/sips/trait-parameters.md +++ b/_sips/sips/025-trait-parameters.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-25 - Trait Parameters -stage: completed -status: shipped +number: 25 permalink: /sips/:title.html redirect_from: /sips/pending/trait-parameters.html +stage: completed +status: shipped +title: Trait Parameters --- > This proposal has been implemented in Scala 3.0. @@ -69,4 +70,4 @@ the evaluation order would be `e1`, initializer of `T`, `e2`, initializer of `V` ## See Also ## -[Dotty Issue #640](https://github.com/scala/scala3/issues/640) +[Dotty Issue #640](https://github.com/lampepfl/dotty/issues/640) diff --git a/_sips/sips/trailing-commas.md b/_sips/sips/027-trailing-commas.md similarity index 99% rename from _sips/sips/trailing-commas.md rename to _sips/sips/027-trailing-commas.md index 7eef93dd03..323b8512e8 100644 --- a/_sips/sips/trailing-commas.md +++ b/_sips/sips/027-trailing-commas.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-27 - Trailing Commas -stage: completed -status: shipped +number: 27 permalink: /sips/:title.html redirect_from: /sips/pending/trailing-commas.html +stage: completed +status: shipped +title: Trailing Commas --- > This proposal has been shipped in Scala 2.12.2. diff --git a/_sips/sips/static-members.md b/_sips/sips/030-static-members.md similarity index 99% rename from _sips/sips/static-members.md rename to _sips/sips/030-static-members.md index 1c0df79d75..546261f1b7 100644 --- a/_sips/sips/static-members.md +++ b/_sips/sips/030-static-members.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-30 - @static fields and methods in Scala objects (SI-4581) -stage: completed -status: shipped +number: 30 permalink: /sips/:title.html redirect_from: /sips/pending/static-members.html +stage: completed +status: shipped +title: "@static fields and methods in Scala objects (SI-4581)" --- > This proposal has been implemented in Scala 3.0.0 diff --git a/_sips/sips/byname-implicits.md b/_sips/sips/031-byname-implicits.md similarity index 99% rename from _sips/sips/byname-implicits.md rename to _sips/sips/031-byname-implicits.md index fd63269068..4ed6256c45 100644 --- a/_sips/sips/byname-implicits.md +++ b/_sips/sips/031-byname-implicits.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-31 - Byname implicit arguments -stage: completed -status: shipped +number: 31 permalink: /sips/:title.html redirect_from: /sips/pending/byname-implicits.html +stage: completed +status: shipped +title: Byname implicit arguments --- > This proposal has been implemented in Scala 2.13.0 and Scala 3.0.0. @@ -39,7 +40,7 @@ the knot" implicitly. ### Implementation status -Byname implicits have been implemented in [Dotty](https://github.com/scala/scala3/issues/1998) +Byname implicits have been implemented in [Dotty](https://github.com/lampepfl/dotty/issues/1998) with an earlier iteration of the divergence checking algorithm described below. A full implementation of this proposal exists as a [pull request](https://github.com/scala/scala/pull/6050) relative to the 2.13.x branch of the Lightbend Scala compiler and it is scheduled to be included in @@ -851,7 +852,7 @@ object Test { because the path `foo` in `foo.Out` is not stable. Full parity with shapeless's `Lazy` would require lazy (rather than byname) implicit parameters (see [this Dotty -ticket](https://github.com/scala/scala3/issues/3005) for further discussion) and is orthogonal to +ticket](https://github.com/lampepfl/dotty/issues/3005) for further discussion) and is orthogonal to this SIP in that they would drop out of support for lazy parameters more generally, as described in [this Scala ticket](https://github.com/scala/bug/issues/240). diff --git a/_sips/sips/priority-based-infix-type-precedence.md b/_sips/sips/033-priority-based-infix-type-precedence.md similarity index 97% rename from _sips/sips/priority-based-infix-type-precedence.md rename to _sips/sips/033-priority-based-infix-type-precedence.md index a67d84dbb5..e55daa9890 100644 --- a/_sips/sips/priority-based-infix-type-precedence.md +++ b/_sips/sips/033-priority-based-infix-type-precedence.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-33 - Priority-based infix type precedence -stage: completed -status: shipped +number: 33 permalink: /sips/:title.html redirect_from: /sips/pending/priority-based-infix-type-precedence.html +stage: completed +status: shipped +title: Priority-based infix type precedence --- **By: Oron Port** @@ -137,7 +138,7 @@ However, it is very unlikely that such interaction would occur. **Related Issues** -* [Dotty Issue #1961](https://github.com/scala/scala3/issues/1961) +* [Dotty Issue #1961](https://github.com/lampepfl/dotty/issues/1961) ## Backward Compatibility diff --git a/_sips/sips/opaque-types.md b/_sips/sips/035-opaque-types.md similarity index 99% rename from _sips/sips/opaque-types.md rename to _sips/sips/035-opaque-types.md index a33083181d..37eeada83c 100644 --- a/_sips/sips/opaque-types.md +++ b/_sips/sips/035-opaque-types.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-35 - Opaque types -stage: completed -status: shipped +number: 35 permalink: /sips/:title.html redirect_from: /sips/pending/opaque-types.html +stage: completed +status: shipped +title: Opaque types --- > This proposal has been implemented with some changes in Scala 3.0.0. diff --git a/_sips/sips/interpolation-quote-escape.md b/_sips/sips/037-interpolation-quote-escape.md similarity index 95% rename from _sips/sips/interpolation-quote-escape.md rename to _sips/sips/037-interpolation-quote-escape.md index 6f0398ce33..9aec1e3cd9 100644 --- a/_sips/sips/interpolation-quote-escape.md +++ b/_sips/sips/037-interpolation-quote-escape.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-37 - Quote escapes for interpolations -stage: completed -status: shipped +number: 37 permalink: /sips/:title.html redirect_from: /sips/pending/interpolation-quote-escape.html +stage: completed +status: shipped +title: Quote escapes for interpolations --- > This proposal has been implemented in Scala 2.13.6 and Scala 3.0.0. @@ -129,4 +130,4 @@ proposals. [^4]: https://github.com/scala/bug/issues/6476#issuecomment-292412577 "@retronym said: +1 to s"$"". Because it doesn't compile today, we don't risk changing the meaning of existing programs." [^5]: https://github.com/Scala/Scala/pull/6953/files#diff-0023b3bfa053fb16603156b785efa7ad "" [^6]: https://github.com/Scala/Scala/pull/4308 "SI-6476 Accept escaped quotes in interp strings" -[^7]: https://github.com/scala/scala3/pull/7486 "PR in dotty" +[^7]: https://github.com/lampepfl/dotty/pull/7486 "PR in dotty" diff --git a/_sips/sips/converters-among-optional-functions-partialfunctions-and-extractor-objects.md b/_sips/sips/038-converters-among-optional-functions-partialfunctions-and-extractor-objects.md similarity index 97% rename from _sips/sips/converters-among-optional-functions-partialfunctions-and-extractor-objects.md rename to _sips/sips/038-converters-among-optional-functions-partialfunctions-and-extractor-objects.md index cad08453c3..28d1829faa 100644 --- a/_sips/sips/converters-among-optional-functions-partialfunctions-and-extractor-objects.md +++ b/_sips/sips/038-converters-among-optional-functions-partialfunctions-and-extractor-objects.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-38 - Converters among optional Functions, PartialFunctions and extractor objects -stage: completed -status: shipped +number: 38 permalink: /sips/:title.html redirect_from: /sips/pending/converters-among-optional-functions-partialfunctions-and-extractor-object.html +stage: completed +status: shipped +title: Converters among optional Functions, PartialFunctions and extractor objects --- > This proposal has been implemented in Scala 2.13.0 and Scala 3.0.0. diff --git a/_sips/sips/right-associative-by-name-operators.md b/_sips/sips/039-right-associative-by-name-operators.md similarity index 98% rename from _sips/sips/right-associative-by-name-operators.md rename to _sips/sips/039-right-associative-by-name-operators.md index 3d247af33d..13e02ca1f6 100644 --- a/_sips/sips/right-associative-by-name-operators.md +++ b/_sips/sips/039-right-associative-by-name-operators.md @@ -1,10 +1,11 @@ --- layout: sip -title: SIP-39 - Right-Associative By-Name Operators -stage: completed -status: shipped +number: 39 permalink: /sips/:title.html redirect_from: /sips/pending/right-associative-by-name-operators.html +stage: completed +status: shipped +title: Right-Associative By-Name Operators --- > This proposal has been implemented in Scala 2.13.0 and Scala 3.0.0. diff --git a/_sips/sips/binary-integer-literals.md b/_sips/sips/042-binary-integer-literals.md similarity index 96% rename from _sips/sips/binary-integer-literals.md rename to _sips/sips/042-binary-integer-literals.md index ef761601fb..e15f57e949 100644 --- a/_sips/sips/binary-integer-literals.md +++ b/_sips/sips/042-binary-integer-literals.md @@ -1,9 +1,10 @@ --- layout: sip -title: SIP-42 - Support Binary Integer Literals +number: 42 +permalink: /sips/:title.html stage: completed status: shipped -permalink: /sips/:title.html +title: Support Binary Integer Literals --- **By: NthPortal** diff --git a/_sips/sips/fewer-braces.md b/_sips/sips/044-fewer-braces.md similarity index 97% rename from _sips/sips/fewer-braces.md rename to _sips/sips/044-fewer-braces.md index 321f665233..8897c9d4a0 100644 --- a/_sips/sips/fewer-braces.md +++ b/_sips/sips/044-fewer-braces.md @@ -1,9 +1,10 @@ --- layout: sip +number: 44 permalink: /sips/:title.html stage: completed status: shipped -title: SIP-44 - Fewer Braces +title: Fewer Braces --- **By: Martin Odersky** @@ -131,7 +132,7 @@ If there would be code using these idioms, it can be rewritten quite simply to a ### Tooling -Since this affects parsing, the scalameta parser and any other parser used in an IDE will also need to be updated. The necessary changes to the Scala 3 parser were made here: https://github.com/scala/scala3/pull/15273/commits. The commit that embodies the core change set is here: https://github.com/scala/scala3/pull/15273/commits/421bdd660b0456c2ff1ae386f032c41bb1e0212a. +Since this affects parsing, the scalameta parser and any other parser used in an IDE will also need to be updated. The necessary changes to the Scala 3 parser were made here: https://github.com/lampepfl/dotty/pull/15273/commits. The commit that embodies the core change set is here: https://github.com/lampepfl/dotty/pull/15273/commits/421bdd660b0456c2ff1ae386f032c41bb1e0212a. ### Handling Edge Cases @@ -288,7 +289,7 @@ This is a tradeoff between conciseness and consistency. In the interest of minim - Doc page for proposed change: https://dotty.epfl.ch/docs/reference/other-new-features/indentation.html#variant-indentation-marker--for-arguments - - Merged PR implementing the proposal under experimental flag: https://github.com/scala/scala3/pull/15273/commits/421bdd660b0456c2ff1ae386f032c41bb1e0212a + - Merged PR implementing the proposal under experimental flag: https://github.com/lampepfl/dotty/pull/15273/commits/421bdd660b0456c2ff1ae386f032c41bb1e0212a - Latest discussion on contributors (there were several before when we discussed indentation in general): https://contributors.scala-lang.org/t/make-fewerbraces-available-outside-snapshot-releases/5024/166 diff --git a/_sips/sips/scala-cli.md b/_sips/sips/046-scala-cli.md similarity index 99% rename from _sips/sips/scala-cli.md rename to _sips/sips/046-scala-cli.md index de9aaece39..e8b7a4b48f 100644 --- a/_sips/sips/scala-cli.md +++ b/_sips/sips/046-scala-cli.md @@ -1,9 +1,10 @@ --- layout: sip +number: 46 permalink: /sips/:title.html stage: completed status: shipped -title: SIP-46 - Scala CLI as default Scala command +title: Scala CLI as default Scala command --- **By: Krzysztof Romanowski and Scala CLI team** diff --git a/_sips/sips/clause-interleaving.md b/_sips/sips/047-clause-interleaving.md similarity index 98% rename from _sips/sips/clause-interleaving.md rename to _sips/sips/047-clause-interleaving.md index e9809815e2..29f334df6f 100644 --- a/_sips/sips/clause-interleaving.md +++ b/_sips/sips/047-clause-interleaving.md @@ -1,9 +1,10 @@ --- layout: sip -title: SIP-47 - Clause Interleaving +number: 47 +permalink: /sips/:title.html stage: completed status: shipped -permalink: /sips/:title.html +title: Clause Interleaving --- **By: Quentin Bernet and Guillaume Martres and Sébastien Doeraene** @@ -167,7 +168,7 @@ As discussed above, we may want to consider generalizing class parameter lists a ## Related work * Pre-SIP: [https://contributors.scala-lang.org/t/clause-interweaving-allowing-def-f-t-x-t-u-y-u/5525](https://contributors.scala-lang.org/t/clause-interweaving-allowing-def-f-t-x-t-u-y-u/5525) -* An implementation of the proposal is available as a pull request at [https://github.com/scala/scala3/pull/14019](https://github.com/scala/scala3/pull/14019) +* An implementation of the proposal is available as a pull request at [https://github.com/lampepfl/dotty/pull/14019](https://github.com/lampepfl/dotty/pull/14019) ## FAQ Currently empty. diff --git a/_sips/sips/polymorphic-eta-expansion.md b/_sips/sips/049-polymorphic-eta-expansion.md similarity index 98% rename from _sips/sips/polymorphic-eta-expansion.md rename to _sips/sips/049-polymorphic-eta-expansion.md index 4099e05cc8..c000b8f7c6 100644 --- a/_sips/sips/polymorphic-eta-expansion.md +++ b/_sips/sips/049-polymorphic-eta-expansion.md @@ -1,9 +1,10 @@ --- layout: sip -title: SIP-49 - Polymorphic Eta-Expansion +number: 49 +permalink: /sips/:title.html stage: implementation status: waiting-for-implementation -permalink: /sips/:title.html +title: Polymorphic Eta-Expansion --- **By: Quentin Bernet and Guillaume Martres** @@ -420,7 +421,7 @@ No other alternatives have been imagined, the similarity between this proposal a - If there is already a proof-of-concept implementation, a link to it will be welcome here. --> * Pre-SIP: https://contributors.scala-lang.org/t/polymorphic-eta-expansion/5516 -* A naive implementation can be found at https://github.com/scala/scala3/pull/14015 (it is more general than this proposal and thus breaks compatibility) +* A naive implementation can be found at https://github.com/lampepfl/dotty/pull/14015 (it is more general than this proposal and thus breaks compatibility) * A compatibility-preserving implementation is in development. diff --git a/_sips/sips/drop-stdlib-forwards-bin-compat.md b/_sips/sips/051-drop-stdlib-forwards-bin-compat.md similarity index 99% rename from _sips/sips/drop-stdlib-forwards-bin-compat.md rename to _sips/sips/051-drop-stdlib-forwards-bin-compat.md index 771804f668..8bfbaa1487 100644 --- a/_sips/sips/drop-stdlib-forwards-bin-compat.md +++ b/_sips/sips/051-drop-stdlib-forwards-bin-compat.md @@ -1,9 +1,10 @@ --- layout: sip +number: 51 permalink: /sips/:title.html -stage: implementation -status: under-review -title: SIP-51 - Drop Forwards Binary Compatibility of the Scala 2.13 Standard Library +stage: completed +status: shipped +title: Drop Forwards Binary Compatibility of the Scala 2.13 Standard Library --- **By: Lukas Rytz** diff --git a/_sips/sips/binary-api.md b/_sips/sips/052-binary-api.md similarity index 95% rename from _sips/sips/binary-api.md rename to _sips/sips/052-binary-api.md index e94bf85a54..2574dd37d4 100644 --- a/_sips/sips/binary-api.md +++ b/_sips/sips/052-binary-api.md @@ -1,9 +1,10 @@ --- layout: sip +number: 52 permalink: /sips/:title.html -stage: implementation -status: under-review -title: SIP-52 - Binary APIs +stage: completed +status: shipped +title: Binary APIs --- **By: Author Nicolas Stucki** @@ -33,7 +34,7 @@ Currently, the compiler automatically generates accessors for references to priv * Changing the implementation of an inline definition can be a binary incompatible change * Removing final from a class is a binary incompatible change -You can find more details in [https://github.com/scala/scala3/issues/16983](https://github.com/scala/scala3/issues/16983) +You can find more details in [https://github.com/lampepfl/dotty/issues/16983](https://github.com/lampepfl/dotty/issues/16983) ### Avoid duplication of inline accessors @@ -249,7 +250,7 @@ Using references to `@publicInBinary` in inline code can cause binary incompatib ### Add a `@binaryAccessor` This annotation would generate an stable accessor. This annotation could be used on `private` definition. It would also mitigate [migration costs](https://gist.github.com/nicolasstucki/003f7293941836b08a0d53dbcb913e3c) for library authors that have published unstable accessors. -* Implementation https://github.com/scala/scala3/pull/16992 +* Implementation https://github.com/lampepfl/dotty/pull/16992 ### Make all `private[C]` part of the binary API @@ -268,9 +269,9 @@ The drawback of this approach is that that we would need to force users to keep ## Related work -* Initial discussions: [https://github.com/scala/scala3/issues/16983](https://github.com/scala/scala3/issues/16983) -* Initial proof of concept (outdated): [https://github.com/scala/scala3/pull/16992](https://github.com/scala/scala3/pull/16992) -* Single annotation proof of concept: [https://github.com/scala/scala3/pull/18402](https://github.com/scala/scala3/pull/18402) +* Initial discussions: [https://github.com/lampepfl/dotty/issues/16983](https://github.com/lampepfl/dotty/issues/16983) +* Initial proof of concept (outdated): [https://github.com/lampepfl/dotty/pull/16992](https://github.com/lampepfl/dotty/pull/16992) +* Single annotation proof of concept: [https://github.com/lampepfl/dotty/pull/18402](https://github.com/lampepfl/dotty/pull/18402) * Community migration analysis: [Gist](https://gist.github.com/nicolasstucki/003f7293941836b08a0d53dbcb913e3c) * Kotlin: [PublishedApi](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-published-api/) plays the same role as `@publicInBinary` but its interaction with (inline definitions)[https://kotlinlang.org/docs/inline-functions.html#restrictions-for-public-api-inline-functions] diff --git a/_sips/sips/quote-pattern-type-variable-syntax.md b/_sips/sips/053-quote-pattern-type-variable-syntax.md similarity index 93% rename from _sips/sips/quote-pattern-type-variable-syntax.md rename to _sips/sips/053-quote-pattern-type-variable-syntax.md index 64f58fafb8..f011c3aadf 100644 --- a/_sips/sips/quote-pattern-type-variable-syntax.md +++ b/_sips/sips/053-quote-pattern-type-variable-syntax.md @@ -1,9 +1,10 @@ --- layout: sip +number: 53 permalink: /sips/:title.html stage: completed status: shipped -title: SIP-53 - Quote pattern explicit type variable syntax +title: Quote pattern explicit type variable syntax --- **By: Nicolas Stucki** @@ -61,11 +62,11 @@ We want to be able to set the bounds of type variables to be able to match again ```scala case '[ head *: tail ] => h[tail] ``` -See [https://github.com/scala/scala3/issues/11738](https://github.com/scala/scala3/issues/11738). +See [https://github.com/lampepfl/dotty/issues/11738](https://github.com/lampepfl/dotty/issues/11738). ### Support matching on any kind of type We want to match against higher-kinded (or `AnyKind`) types. This is not possible due to the default upper bound of `Any`. -See [https://github.com/scala/scala3/issues/10864](https://github.com/scala/scala3/issues/10864). +See [https://github.com/lampepfl/dotty/issues/10864](https://github.com/lampepfl/dotty/issues/10864). ### Support multiple references to the same type in quoted type patterns We want to be able to match using several references to the same type variable. @@ -137,8 +138,8 @@ TASTy only contains explicit type variable definitions, and this encoding would ## Related work -* Proof of concept of type variable syntax: [https://github.com/scala/scala3/pull/16910](https://github.com/scala/scala3/pull/16910) -* Proof of concept of backticks (only interested in the first bullet point): [https://github.com/scala/scala3/pull/16935](https://github.com/scala/scala3/pull/16935) +* Proof of concept of type variable syntax: [https://github.com/lampepfl/dotty/pull/16910](https://github.com/lampepfl/dotty/pull/16910) +* Proof of concept of backticks (only interested in the first bullet point): [https://github.com/lampepfl/dotty/pull/16935](https://github.com/lampepfl/dotty/pull/16935) * Implementation: [https://github.com/scala/scala3/pull/17362](https://github.com/scala/scala3/pull/17362) * Stabilized implementation: [https://github.com/scala/scala3/pull/18574](https://github.com/scala/scala3/pull/18574) diff --git a/_sips/sips/multi-source-extension-overloads.md b/_sips/sips/054-multi-source-extension-overloads.md similarity index 98% rename from _sips/sips/multi-source-extension-overloads.md rename to _sips/sips/054-multi-source-extension-overloads.md index fdcfd7050b..bc79b2fb57 100644 --- a/_sips/sips/multi-source-extension-overloads.md +++ b/_sips/sips/054-multi-source-extension-overloads.md @@ -1,9 +1,10 @@ --- layout: sip +number: 54 permalink: /sips/:title.html stage: completed status: shipped -title: SIP-54 - Multi-Source Extension Overloads +title: Multi-Source Extension Overloads --- **By: Sébastien Doeraene and Martin Odersky** @@ -226,7 +227,7 @@ A number of alternatives were mentioned in [the Contributors thread](https://con ## Related work - [Contributors thread acting as de facto Pre-SIP](https://contributors.scala-lang.org/t/change-shadowing-mechanism-of-extension-methods-for-on-par-implicit-class-behavior/5831) -- [Pull Request in dotty](https://github.com/scala/scala3/pull/17050) to support it under an experimental import +- [Pull Request in dotty](https://github.com/lampepfl/dotty/pull/17050) to support it under an experimental import ## FAQ diff --git a/_sips/sips/match-types-spec.md b/_sips/sips/056-match-types-spec.md similarity index 99% rename from _sips/sips/match-types-spec.md rename to _sips/sips/056-match-types-spec.md index 049fad9415..88022e7f57 100644 --- a/_sips/sips/match-types-spec.md +++ b/_sips/sips/056-match-types-spec.md @@ -1,9 +1,10 @@ --- layout: sip +number: 56 permalink: /sips/:title.html stage: completed status: shipped -title: SIP-56 - Proper Specification for Match Types +title: Proper Specification for Match Types --- **By: Sébastien Doeraene** @@ -95,7 +96,7 @@ It is however not possible to guarantee that property for *all* cases, since the #### Preamble Some of the concepts mentioned here are defined in the existing Scala 3 specification draft. -That draft can be found in the dotty repository at https://github.com/scala/scala3/tree/main/docs/_spec. +That draft can be found in the dotty repository at https://github.com/lampepfl/dotty/tree/main/docs/_spec. It is not rendered anywhere yet, though. Here are some of the relevant concepts that are perhaps lesser-known: @@ -583,7 +584,7 @@ Notable prior work related to this proposal includes: - [Current reference page for Scala 3 match types](https://dotty.epfl.ch/docs/reference/new-types/match-types.html) - [Abstractions for Type-Level Programming](https://infoscience.epfl.ch/record/294024), Olivier Blanvillain, Chapter 4 (Match Types) - ["Pre-Sip" discussion in the Contributors forum](https://contributors.scala-lang.org/t/pre-sip-proper-specification-for-match-types/6265) (submitted at the same time as this SIP document) -- [PR with the proposed implementation](https://github.com/scala/scala3/pull/18262) +- [PR with the proposed implementation](https://github.com/lampepfl/dotty/pull/18262) ## FAQ diff --git a/_sips/sips/replace-nonsensical-unchecked-annotation.md b/_sips/sips/057-replace-nonsensical-unchecked-annotation.md similarity index 81% rename from _sips/sips/replace-nonsensical-unchecked-annotation.md rename to _sips/sips/057-replace-nonsensical-unchecked-annotation.md index 3bb8609940..24da792513 100644 --- a/_sips/sips/replace-nonsensical-unchecked-annotation.md +++ b/_sips/sips/057-replace-nonsensical-unchecked-annotation.md @@ -1,10 +1,11 @@ --- layout: sip +number: 57 permalink: /sips/:title.html -stage: implementation -status: under-review presip-thread: https://contributors.scala-lang.org/t/pre-sip-replace-non-sensical-unchecked-annotations/6342 -title: SIP-57 - Replace non-sensical @unchecked annotations +stage: completed +status: shipped +title: Replace non-sensical @unchecked annotations --- **By: Martin Odersky and Jamie Thompson** @@ -15,12 +16,13 @@ title: SIP-57 - Replace non-sensical @unchecked annotations |---------------|--------------------| | Dec 8th 2023 | Initial Draft | | Jan 19th 2024 | Clarification about current @unchecked behavior | +| Jun 3rd 2025 | Rename `.runtimeCheck` to `.runtimeChecked` | ## Summary We propose to replace the mechanism to silence warnings for "unchecked" patterns, in the cases where silencing the warning will still result in the pattern being checked at runtime. -Currently, a user can silence warnings that a scrutinee may not be matched by a pattern, by annotating the scrutinee with the `@unchecked` annotation. This SIP proposes to use a new annotation `@RuntimeCheck` to replace `@unchecked` for this purpose. For convenience, an extension method will be added to `Predef` that marks the receiver with the annotation (used as follows: `foo.runtimeCheck`). Functionally it behaves the same as the old annotation, but improves readability at the callsite. +Currently, a user can silence warnings that a scrutinee may not be matched by a pattern, by annotating the scrutinee with the `@unchecked` annotation. This SIP proposes to use a new annotation `@RuntimeCheck` to replace `@unchecked` for this purpose. For convenience, an extension method will be added to `Predef` that marks the receiver with the annotation (used as follows: `foo.runtimeChecked`). Functionally it behaves the same as the old annotation, but improves readability at the callsite. ## Motivation @@ -92,15 +94,15 @@ In all usages where the compiler looks for `@unchecked` for this purpose, we ins By placing the annotation in the `internal` package, we communicate that the user is not meant to directly use the annotation. -Instead, for convenience, we provide an extension method `Predef.runtimeCheck`, which can be applied to any expression. +Instead, for convenience, we provide an extension method `Predef.runtimeChecked`, which can be applied to any expression. The new usage to assert that a pattern is checked at runtime then becomes as follows: ```scala def xs: List[Any] = ??? -val y :: ys = xs.runtimeCheck +val y :: ys = xs.runtimeChecked ``` -We also make `runtimeCheck` a transparent inline method. This ensures that the elaboration of the method defines its semantics. (i.e. `runtimeCheck` is not meaningful because it is immediately inlined at type-checking). +We also make `runtimeChecked` a transparent inline method. This ensures that the elaboration of the method defines its semantics. (i.e. `runtimeChecked` is not meaningful because it is immediately inlined at type-checking). ### Specification @@ -113,7 +115,7 @@ import scala.annotation.internal.RuntimeCheck object Predef: extension [T](x: T) - transparent inline def runtimeCheck: x.type = + transparent inline def runtimeChecked: x.type = x: @RuntimeCheck ``` @@ -128,8 +130,8 @@ Considering backwards source compatibility, the following situation will change: package example extension (predef: scala.Predef.type) - transparent inline def runtimeCheck[T](x: T): x.type = - println("fake runtimeCheck") + transparent inline def runtimeChecked[T](x: T): x.type = + println("fake runtimeChecked") x ``` ```scala @@ -138,16 +140,16 @@ package example @main def Test = val xs = List[Any](1,2,3) - val y :: ys = Predef.runtimeCheck(xs) + val y :: ys = Predef.runtimeChecked(xs) assert(ys == List(2, 3)) ``` -Previously this code would print `fake runtimeCheck`, however with the proposed change then recompiling this code will _succeed_ and no longer will print. +Previously this code would print `fake runtimeChecked`, however with the proposed change then recompiling this code will _succeed_ and no longer will print. Potentially we could mitigate this if necessary with a migration warning when the new method is resolved (`@experimental` annotation would be a start) -In general however, the new `runtimeCheck` method will not change any previously linking method without causing an ambiguity compilation error. +In general however, the new `runtimeChecked` method will not change any previously linking method without causing an ambiguity compilation error. ### Other concerns @@ -216,9 +218,9 @@ On line 2: warning: non-variable type argument Int in type pattern scala.collect val res2: Int = 1 ``` -#### Aligning to Scala 2.13 semantics with runtimeCheck +#### Aligning to Scala 2.13 semantics with `runtimeChecked` -with `xs.runtimeCheck` we should still produce an unchecked warning for `case is: ::[Int] =>` +with `xs.runtimeChecked` we should still produce an unchecked warning for `case is: ::[Int] =>` ```scala scala> xs.runtimeChecked match { | case is: ::[Int] => is.head @@ -239,15 +241,15 @@ scala> xs.runtimeChecked match { | } val res14: Int = 1 ``` -This has a small extra migration cost because if the scrutinee changes from `(xs: @unchecked)` to `xs.runtimeCheck` now some individual cases might need to add `@unchecked` on type arguments to avoid creating new warnings - however this cost is offset by perhaps revealing unsafe patterns previously unaccounted for. +This has a small extra migration cost because if the scrutinee changes from `(xs: @unchecked)` to `xs.runtimeChecked` now some individual cases might need to add `@unchecked` on type arguments to avoid creating new warnings - however this cost is offset by perhaps revealing unsafe patterns previously unaccounted for. Once again `@nowarn` can be used to fully restore any old behavior ## Alternatives -1) make `runtimeCheck` a method on `Any` that returns the receiver (not inline). The compiler would check for presence of a call to this method when deciding to perform static checking of pattern exhaustivity. This idea was criticised for being brittle with respect to refactoring, or automatic code transformations via macro. +1) make `runtimeChecked` a method on `Any` that returns the receiver (not inline). The compiler would check for presence of a call to this method when deciding to perform static checking of pattern exhaustivity. This idea was criticised for being brittle with respect to refactoring, or automatic code transformations via macro. -2) `runtimeCheck` should elaborate to code that matches the expected type, e.g. to heal `t: Any` to `Int` when the expected type is `Int`. The problem is that this is not useful for patterns that can not be runtime checked by type alone. Also, it implies a greater change to the spec, because now `runtimeCheck` would have to be specially treated. +2) `runtimeChecked` should elaborate to code that matches the expected type, e.g. to heal `t: Any` to `Int` when the expected type is `Int`. The problem is that this is not useful for patterns that can not be runtime checked by type alone. Also, it implies a greater change to the spec, because now `runtimeChecked` would have to be specially treated. ## Related work diff --git a/_sips/sips/named-tuples.md b/_sips/sips/058-named-tuples.md similarity index 99% rename from _sips/sips/named-tuples.md rename to _sips/sips/058-named-tuples.md index 431107cd14..01c1461c02 100644 --- a/_sips/sips/named-tuples.md +++ b/_sips/sips/058-named-tuples.md @@ -1,10 +1,11 @@ --- layout: sip +number: 58 permalink: /sips/named-tuples.html +presip-thread: https://contributors.scala-lang.org/t/pre-sip-named-tuples/6403/164 stage: completed status: shipped -presip-thread: https://contributors.scala-lang.org/t/pre-sip-named-tuples/6403/164 -title: SIP-58 - Named Tuples +title: Named Tuples --- **By: Martin Odersky** @@ -382,7 +383,7 @@ This section should list prior work related to the proposal, notably: - [SIP 43 on Pattern Matching with Named Fields](https://github.com/scala/improvement-proposals/pull/44) -- [Experimental Implementation](https://github.com/scala/scala3/pull/19174) +- [Experimental Implementation](https://github.com/lampepfl/dotty/pull/19174) ## FAQ diff --git a/_sips/sips/multiple-assignments.md b/_sips/sips/059-multiple-assignments.md similarity index 99% rename from _sips/sips/multiple-assignments.md rename to _sips/sips/059-multiple-assignments.md index b55044b7d9..d0267f7826 100644 --- a/_sips/sips/multiple-assignments.md +++ b/_sips/sips/059-multiple-assignments.md @@ -1,10 +1,11 @@ --- layout: sip +number: 59 permalink: /sips/:title.html +presip-thread: https://contributors.scala-lang.org/t/pre-sip-multiple-assignments/6425 stage: implementation status: under-review -presip-thread: https://contributors.scala-lang.org/t/pre-sip-multiple-assignments/6425 -title: SIP-59 - Multiple Assignments +title: Multiple Assignments --- **By: Dimi Racordon** diff --git a/_sips/sips/alternative-bind-variables.md b/_sips/sips/060-alternative-bind-variables.md similarity index 98% rename from _sips/sips/alternative-bind-variables.md rename to _sips/sips/060-alternative-bind-variables.md index ab6899a026..211ad8d41a 100644 --- a/_sips/sips/alternative-bind-variables.md +++ b/_sips/sips/060-alternative-bind-variables.md @@ -1,10 +1,11 @@ --- layout: sip +number: 60 permalink: /sips/:title.html +presip-thread: https://contributors.scala-lang.org/t/pre-sip-bind-variables-for-alternative-patterns/6321/13 stage: implementation status: waiting-for-implementation -presip-thread: https://contributors.scala-lang.org/t/pre-sip-bind-variables-for-alternative-patterns/6321/13 -title: SIP-60 - Bind variables within alternative patterns +title: Bind variables within alternative patterns --- **By: Yilin Wei** @@ -317,7 +318,7 @@ The associated [thread](https://contributors.scala-lang.org/t/pre-sip-bind-varia ## Implementation The author has a current in-progress implementation focused on the typer which compiles the examples with the expected types. Interested - parties are welcome to see the WIP [here](https://github.com/scala/scala3/compare/main...yilinwei:dotty:main). + parties are welcome to see the WIP [here](https://github.com/lampepfl/dotty/compare/main...yilinwei:dotty:main). ### Further work diff --git a/_sips/sips/unroll-default-arguments.md b/_sips/sips/061-unroll-default-arguments.md similarity index 99% rename from _sips/sips/unroll-default-arguments.md rename to _sips/sips/061-unroll-default-arguments.md index 6d90188b57..4674ccde86 100644 --- a/_sips/sips/unroll-default-arguments.md +++ b/_sips/sips/061-unroll-default-arguments.md @@ -1,9 +1,10 @@ --- layout: sip +number: 61 permalink: /sips/:title.html stage: implementation status: under-review -title: SIP-61 - Unroll Default Arguments for Binary Compatibility +title: Unroll Default Arguments for Binary Compatibility --- **By: Li Haoyi** diff --git a/_sips/sips/better-fors.md b/_sips/sips/062-better-fors.md similarity index 99% rename from _sips/sips/better-fors.md rename to _sips/sips/062-better-fors.md index 10cfa733ea..a317f044ca 100644 --- a/_sips/sips/better-fors.md +++ b/_sips/sips/062-better-fors.md @@ -1,9 +1,10 @@ --- layout: sip +number: 62 permalink: /sips/:title.html stage: implementation status: under-review -title: SIP-62 - For comprehension improvements +title: For comprehension improvements --- **By: Kacper Korban (VirtusLab)** @@ -472,9 +473,9 @@ The only Open community build library that failed because of the change to the d ## Links 1. Scala contributors discussion thread (pre-SIP): https://contributors.scala-lang.org/t/pre-sip-improve-for-comprehensions-functionality/3509/51 -2. Github issue discussion about for desugaring: https://github.com/scala/scala3/issues/2573 +2. Github issue discussion about for desugaring: https://github.com/lampepfl/dotty/issues/2573 3. Scala 2 implementation of some of the improvements: https://github.com/oleg-py/better-monadic-for -4. Implementation of one of the simplifications: https://github.com/scala/scala3/pull/16703 +4. Implementation of one of the simplifications: https://github.com/lampepfl/dotty/pull/16703 5. Draft implementation branch: https://github.com/dotty-staging/dotty/tree/improved-fors 6. Minimized issue reproducing the problem with the current desugaring: https://github.com/scala/scala3/issues/21804 7. (empty :sad:) Contributors thread about better effect loops with for-comprehensions: https://contributors.scala-lang.org/t/pre-sip-sip-62-addition-proposal-better-effect-loops-with-for-comprehensions/6759 diff --git a/_sips/sips/typeclasses-syntax.md b/_sips/sips/064-typeclasses-syntax.md similarity index 99% rename from _sips/sips/typeclasses-syntax.md rename to _sips/sips/064-typeclasses-syntax.md index 38dcba9293..ec63bb4309 100644 --- a/_sips/sips/typeclasses-syntax.md +++ b/_sips/sips/064-typeclasses-syntax.md @@ -1,9 +1,11 @@ --- layout: sip +number: 64 +permalink: /sips/:title.html +presip-thread: https://contributors.scala-lang.org/t/pre-sip-improve-syntax-for-context-bounds-and-givens/6576/97 stage: completed status: shipped -presip-thread: https://contributors.scala-lang.org/t/pre-sip-improve-syntax-for-context-bounds-and-givens/6576/97 -title: SIP-64 - Improve Syntax for Context Bounds and Givens +title: Improve Syntax for Context Bounds and Givens --- **By: Martin Odersky** diff --git a/_sips/sips/068-reference-package-objects.md b/_sips/sips/068-reference-package-objects.md new file mode 100644 index 0000000000..62eedbdee4 --- /dev/null +++ b/_sips/sips/068-reference-package-objects.md @@ -0,0 +1,254 @@ +--- +layout: sip +number: 68 +permalink: /sips/:title.html +stage: completed +status: shipped +title: Reference-able Package Objects +--- + +**By: Li Haoyi** + +## History + +| Date | Version | +|---------------|--------------------| +| Dec 14th 2024 | Initial Draft | + +## Summary + +This proposal is to allow the following: + +```scala +package a +package object b + +val z = a.b // Currently fails with "package is not a value" +``` + + +Currently the workaround is to use a `.package` suffix: + +```scala +val z = a.b.`package` +``` + +This proposal is to make it such that given `a.b`, if `b` is a `package` +containing a `package object`, expands to `a.b.package` automatically + + +One limitation with `package object`s is that we cannot currently assign them to +values: `a.b` fails to compile when `b` is a `package object`, even though it succeeds when +`b` is a normal `object`. The workaround is to call `a.b.package`, which is ugly and +non-obvious, or to use a normal `object`, which is not always possible. There is no other +way to refer to the `package object b` in the example above. + +Allowing `a.b` to automatically expand into `a.b.package` when `b` is a +`package object` will simplify the language, simplify IDE support for the +language, and generally make things more uniform and regular. + + +Prior Discussion can be found [here](https://contributors.scala-lang.org/t/pre-sip-reference-able-package-objects/6939) + +## Motivation + +Although package objects have been discussed [being dropped](https://docs.scala-lang.org/scala3/reference/dropped-features/package-objects.html) +in Scala 3, no concrete plans have been made as to how to do so, and we argue that they +are sufficiently useful that keeping them around is preferably to dropping them. + +### Package Entrypoints + +`package object`s are the natural "entry point" of a package. While top-level declarations +reduce their need somewhat, they do not replace it: `package object`s are still necessary +for adding package-level documentation or having the package-level API inherit from traits +or classes. For example the [Acyclic Plugin](https://github.com/com-lihaoyi/acyclic) uses package +objects as a place to put package-level annotations in source code to apply package-level +semantics in the compiler plugin. + +Other languages have equivalent constructs (`module-info.java` or `__init__.py`) +that fulfil the same need, so it's not just a quirk of the Scala language. + +### Package API Facades + +Many libraries use package objects to expose the "facade" of the package hierarchy: + +- Mill uses `package object`s to expose the build definitions within each `package`, and + each one is an instance of `mill.Module` + +- Requests-Scala uses a `package object` to represent the default `requests.BaseSession` + instance with the default configuration for people to use + +- PPrint uses a `package object` to expose the `pprint.log` and other APIs for people to use + directly, as a default instance of `PPrinter` + +- OS-Lib uses a `package object` to expose the primary API of the `os.*` operations + +None of these use cases can be satisfied by normal `object`s or by top-level declarations, +due to the necessity of documentation and inheritance. They need to be `package object`s. + +However, the fact that you cannot easily pass around these default instances as values e.g. +`val x: PPrinter = pprint` without calling `pprint.package` is a source of friction. + +### Uniform Semantics + +This source of friction is not just for humans, but for tools as well. For example, IntelliJ +needs a special case and special handling in the Scala plugin specifically to support this irregularity: + +* Original irregularity https://github.com/JetBrains/intellij-scala/blob/idea242.x/scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScReferenceExpressionImpl.scala#L198 + +* Special casing to support Mill, which allows references to package objects https://github.com/JetBrains/intellij-scala/pull/672 + +The fact that it is impossible to refer to the `package object` without using a `.package` suffix +is a wart: `.package` is an implementation/encoding detail, and so should not be a necessary part +of the user-facing language. We can refer to all other Scala definitions and objects without +leaking implementation/encoding details, and it would be more uniform to allow that for +`package object`s as well. + + +## User Alternatives + +The two main alternatives now are to use `.package` suffixes, e.g. in Mill writing: + +```scala +def moduleDeps = Seq(foo.`package`, bar.`package`, qux.baz.`package`) +``` + +Or to use normal `object`s. Notably, normal `object`s do not allow `package`s of the +same name, which leads to contortions. e.g. Rather than: + +```scala +package object foo extends _root_.foo.bar.Qux{ + val bar = 1 +} +``` +```scala +package foo.bar +class Qux +``` + +We need to move the `package foo` contents into `package foo2` to avoid conflicts with +`object foo`, and then we need to add back aliases to all the declarations in `foo2` to make +them available in `foo`: + +```scala +object foo extends foo2.bar.Qux{ + val bar = 1 + object bar{ + type Qux = foo2.bar.Qux + } +} +``` +```scala +package foo2.bar +class Qux +``` + +Both of these workarounds are awkward and non-idiomatic, but are necessary due to current +limitations in referencing `package object`s directly + +Notably, normal `object`s are not a replacement for `package object`s, because only +`package object`s allow the package contents to be defined in other files. Normal `object`s +would require that the package contents be all defined in a single file in the `object` body, +or scattered into other files as `trait`s in _different_ `package`s and mixed into the +`object`, both of which are messy and sub-optimal. + +It's possible to have a convention _"the `object` named `foo` is always going to be the +primary entrypoint for a package"_, but that is just a poor-man's `package object` with worse +syntax and less standardization. + +## Implementation Alternatives + +* We could make `a.b` where `b` is a `package` refer to the entire `package b` namespace, not + just the `package object`. This cannot in general work due to the JVM's _open packages_ and + separate compilation: while `package object`s can only exist in one file present in one + compilation run, JVM `package`s can contain arbitrary sets of classes from different compilation + runs. Thus it is impossible in general to define a "complete" API for a JVM `package` for us to + generate an object to refer to. + +* Using Scala 3 [Top Level Definitions](https://docs.scala-lang.org/scala3/book/taste-toplevel-definitions.html) + is one possible alternative to `package object`s, but they fall short on many use cases: + * Top-level definitions cannot generate objects that inherit from classes or traits, which + is necessary in many use cases: Mill (needs them to inherit `mill.Module`), Requests- + Scala (needs it to inherit from `requests.BaseSession`), etc. + * Top-level definitions can be defined in multiple files, so suffer from the issue that + it is at any point in time impossible to know the "entire" API of a `package` provided + by top-level definitions + * Top-level definitions do not provide a natural "package entrypoint" to the `package` source folder, + to provide package-level documentation, annotations, etc.. We could provide another `.scala` + file that we specify by-convention to be the "package entrypoint", but we already have + `package.scala` and it does the job just fine + + +## Limitations + +* With this proposal, `a.b.c` can be refactored to `val x = a.b; x.c` only when `c` is declared inside + the `a.b` package object. This is slightly more irregular than the status quo, which disallows such + a refactoring at any time. In general, a package with a package object no longer behaves the same + as a package without. + +## Open Questions + +There are some open questions that can be resolved during experimentation + +* Should package objects be usable as singleton type prefixes, e.g. `type foo == scala.type`? +* Should package objects participate in `foo() -> foo.apply()` desugaring, e.g. `_root_.pprint(124)`? +* + +## Implementation & Testing + + +Mill since version 0.12.0 already emulates this proposed behavior in Scala 2 using source-code +mangling hacks, with custom support in IntelliJ. It works great and does what it was intended +to do (allow passing around `package object`s as values without having to call `.package` every time) + +We have a prototype Scala3 implementation here: + +* https://github.com/scala/scala3/pull/22011 + +The necessary IntelliJ changes have been made below: + +* https://github.com/JetBrains/intellij-scala/pull/672 + +With IntelliJ-side discussion: + +* https://youtrack.jetbrains.com/issue/SCL-23198/Direct-references-to-package-objects-should-be-allowed-in-.mill-files + +These IntelliJ changes are currently guarded to only apply to `.mill` files, but the +guard can easily be removed to make it apply to any Scala files. In fact, implementing +this proposal would involve _removing_ a considerable amount of special casing from +the Intellij-Scala plugin, resulting in the code analysis for looking up references in +the Scala language to become much more regular and straightforward: + +```diff +lihaoyi intellij-scala$ git diff +diff --git a/scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScReferenceExpressionImpl.scala b/scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScReferenceExpressionImpl.scala +index b820dff8c3..29ba15bcdd 100644 +--- a/scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScReferenceExpressionImpl.scala ++++ b/scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScReferenceExpressionImpl.scala +@@ -182,24 +182,7 @@ class ScReferenceExpressionImpl(node: ASTNode) extends ScReferenceImpl(node) wit + }) + + override def getKinds(incomplete: Boolean, completion: Boolean = false): _root_.org.jetbrains.plugins.scala.lang.resolve.ResolveTargets.ValueSet = { +- val context = getContext +- context match { +- case _ if completion => +- StdKinds.refExprQualRef // SCL-3092 +- case _: ScReferenceExpression => +- StdKinds.refExprQualRef +- case postf: ScPostfixExpr if this == postf.operation || this == postf.getBaseExpr => +- StdKinds.refExprQualRef +- case pref: ScPrefixExpr if this == pref.operation || this == pref.getBaseExpr => +- StdKinds.refExprQualRef +- case inf: ScInfixExpr if this == inf.operation || this == inf.getBaseExpr => +- StdKinds.refExprQualRef +- case _ => +- // Mill files allow direct references to package +- // objects, even though normal .scala files do not +- if (this.containingScalaFile.exists(_.isMillFile)) StdKinds.refExprQualRef +- else StdKinds.refExprLastRef +- } ++ StdKinds.refExprQualRef + } + + override def multiType: Array[TypeResult] = { +``` diff --git a/_sips/sips/adding-prefix-types.md b/_sips/sips/adding-prefix-types.md deleted file mode 100644 index 611baff9c0..0000000000 --- a/_sips/sips/adding-prefix-types.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-36 - Adding prefix types -status: withdrawn -pull-request-number: 35 - ---- diff --git a/_sips/sips/allow-referring-to-other-arguments-in-default-parameters.md b/_sips/sips/allow-referring-to-other-arguments-in-default-parameters.md deleted file mode 100644 index 9eaec18d7b..0000000000 --- a/_sips/sips/allow-referring-to-other-arguments-in-default-parameters.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-32 - Allow referring to other arguments in default parameters -status: rejected -pull-request-number: 29 - ---- diff --git a/_sips/sips/async.md b/_sips/sips/async.md deleted file mode 100644 index 49448af0cb..0000000000 --- a/_sips/sips/async.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-22 - Async -status: withdrawn -pull-request-number: 21 - ---- diff --git a/_sips/sips/comonadic-comprehensions.md b/_sips/sips/comonadic-comprehensions.md deleted file mode 100644 index d668fc4d78..0000000000 --- a/_sips/sips/comonadic-comprehensions.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-NN - comonadic-comprehensions -status: rejected -pull-request-number: 32 - ---- diff --git a/_sips/sips/concurrency-with-higher-order-coroutines.md b/_sips/sips/concurrency-with-higher-order-coroutines.md deleted file mode 100644 index 837df46236..0000000000 --- a/_sips/sips/concurrency-with-higher-order-coroutines.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: SIP-55 - Concurrency with Higher-Order Coroutines -status: under-review -pull-request-number: 63 -stage: design - ---- diff --git a/_sips/sips/curried-varargs.md b/_sips/sips/curried-varargs.md deleted file mode 100644 index 402630e152..0000000000 --- a/_sips/sips/curried-varargs.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-45 - Curried varargs -status: rejected -pull-request-number: 41 - ---- diff --git a/_sips/sips/eference-able-package-objects.md b/_sips/sips/eference-able-package-objects.md deleted file mode 100644 index cfba956529..0000000000 --- a/_sips/sips/eference-able-package-objects.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: 'SIP-68: Reference-able Package Objects' -status: under-review -pull-request-number: 100 -stage: implementation - ---- diff --git a/_sips/sips/implicit-macro-conversions.md b/_sips/sips/implicit-macro-conversions.md deleted file mode 100644 index 82e7ab2ff5..0000000000 --- a/_sips/sips/implicit-macro-conversions.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: SIP-66 - Implicit macro conversions -status: under-review -pull-request-number: 86 -stage: design - ---- diff --git a/_sips/sips/implicit-source-locations.md b/_sips/sips/implicit-source-locations.md deleted file mode 100644 index a51a574f5d..0000000000 --- a/_sips/sips/implicit-source-locations.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-19 - Implicit Source Locations -status: rejected -pull-request-number: 18 - ---- diff --git a/_sips/sips/improve-strictequality-feature-for-better-compatibility-with-existing-code-bases.md b/_sips/sips/improve-strictequality-feature-for-better-compatibility-with-existing-code-bases.md deleted file mode 100644 index 29276bba12..0000000000 --- a/_sips/sips/improve-strictequality-feature-for-better-compatibility-with-existing-code-bases.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: SIP-67 - Improve strictEquality feature for better compatibility with existing - code bases -status: waiting-for-implementation -pull-request-number: 97 -stage: implementation - ---- diff --git a/_sips/sips/improved-lazy-vals-initialization.md b/_sips/sips/improved-lazy-vals-initialization.md deleted file mode 100644 index efb891962b..0000000000 --- a/_sips/sips/improved-lazy-vals-initialization.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: SIP-20 - Improved Lazy Vals Initialization -status: shipped -pull-request-number: 19 -stage: completed - ---- diff --git a/_sips/sips/improving-binary-compatibility-with-stableabi.md b/_sips/sips/improving-binary-compatibility-with-stableabi.md deleted file mode 100644 index 6e48e46553..0000000000 --- a/_sips/sips/improving-binary-compatibility-with-stableabi.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-34 - Improving binary compatibility with @stableABI -status: withdrawn -pull-request-number: 30 - ---- diff --git a/_sips/sips/inline-meta.md b/_sips/sips/inline-meta.md deleted file mode 100644 index c27ee3530a..0000000000 --- a/_sips/sips/inline-meta.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-28 - Inline meta -status: withdrawn -pull-request-number: 28 - ---- diff --git a/_sips/sips/name-based-xml-literals.md b/_sips/sips/name-based-xml-literals.md deleted file mode 100644 index 1b3e699b01..0000000000 --- a/_sips/sips/name-based-xml-literals.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-40 - Name Based XML Literals -status: rejected -pull-request-number: 42 - ---- diff --git a/_sips/sips/pattern-matching-with-named-fields.md b/_sips/sips/pattern-matching-with-named-fields.md deleted file mode 100644 index c1c304a61f..0000000000 --- a/_sips/sips/pattern-matching-with-named-fields.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-43 - Pattern matching with named fields -status: withdrawn -pull-request-number: 44 - ---- diff --git a/_sips/sips/precise-type-modifier.md b/_sips/sips/precise-type-modifier.md deleted file mode 100644 index 9c316bbd8c..0000000000 --- a/_sips/sips/precise-type-modifier.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-48 - Precise Type Modifier -status: withdrawn -pull-request-number: 48 - ---- diff --git a/_sips/sips/repeated-by-name-parameters.md b/_sips/sips/repeated-by-name-parameters.md deleted file mode 100644 index 6949fcf87c..0000000000 --- a/_sips/sips/repeated-by-name-parameters.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-24 - Repeated By Name Parameters -status: withdrawn -pull-request-number: 23 - ---- diff --git a/_sips/sips/scala-3-macro-annotations.md b/_sips/sips/scala-3-macro-annotations.md deleted file mode 100644 index 497a56896e..0000000000 --- a/_sips/sips/scala-3-macro-annotations.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: SIP-63 - Scala 3 Macro Annotations -status: under-review -pull-request-number: 80 -stage: design - ---- diff --git a/_sips/sips/sealed-types.md b/_sips/sips/sealed-types.md deleted file mode 100644 index 04754c6be7..0000000000 --- a/_sips/sips/sealed-types.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-41 - Sealed Types -status: withdrawn -pull-request-number: 43 - ---- diff --git a/_sips/sips/self-cleaning-macros.md b/_sips/sips/self-cleaning-macros.md deleted file mode 100644 index 056a674a38..0000000000 --- a/_sips/sips/self-cleaning-macros.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-16 - Self-cleaning Macros -status: rejected -pull-request-number: 15 - ---- diff --git a/_sips/sips/spores.md b/_sips/sips/spores.md deleted file mode 100644 index 2b9c51d5a3..0000000000 --- a/_sips/sips/spores.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-21 - Spores -status: withdrawn -pull-request-number: 20 - ---- diff --git a/_sips/sips/struct-classes.md b/_sips/sips/struct-classes.md deleted file mode 100644 index a9109fd45b..0000000000 --- a/_sips/sips/struct-classes.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-50 - Struct Classes -status: withdrawn -pull-request-number: 50 - ---- diff --git a/_sips/sips/uncluttering-abuse-of-match.md b/_sips/sips/uncluttering-abuse-of-match.md deleted file mode 100644 index 49f004f812..0000000000 --- a/_sips/sips/uncluttering-abuse-of-match.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-39 - Uncluttering Abuse of Match -status: rejected -pull-request-number: 37 - ---- diff --git a/_sips/sips/uncluttering-scalas-syntax-for-control-structures.md b/_sips/sips/uncluttering-scalas-syntax-for-control-structures.md deleted file mode 100644 index a4c9d95a95..0000000000 --- a/_sips/sips/uncluttering-scalas-syntax-for-control-structures.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-12 - Uncluttering Scala’s syntax for control structures. -status: rejected -pull-request-number: 12 - ---- diff --git a/_sips/sips/unsigned-integers.md b/_sips/sips/unsigned-integers.md deleted file mode 100644 index 4cfa9995db..0000000000 --- a/_sips/sips/unsigned-integers.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-26 - Unsigned Integers -status: rejected -pull-request-number: 27 - ---- diff --git a/_sips/sips/wildcard-context-bounds.md b/_sips/sips/wildcard-context-bounds.md deleted file mode 100644 index 7ef71f1f61..0000000000 --- a/_sips/sips/wildcard-context-bounds.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: SIP-52 - Wildcard context bounds -status: withdrawn -pull-request-number: 55 - ---- diff --git a/_sips/sips/xistential-containers.md b/_sips/sips/xistential-containers.md deleted file mode 100644 index a3f4764c3e..0000000000 --- a/_sips/sips/xistential-containers.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: 'SIP-69: Existential containers' -status: under-review -pull-request-number: 101 -stage: design - ---- diff --git a/_zh-cn/overviews/scala3-book/string-interpolation.md b/_zh-cn/overviews/scala3-book/string-interpolation.md index 372eccc5e0..c09fed715e 100644 --- a/_zh-cn/overviews/scala3-book/string-interpolation.md +++ b/_zh-cn/overviews/scala3-book/string-interpolation.md @@ -353,4 +353,4 @@ p"${x/5}, $x" // Point(2.4, 12.0) [java-format-docs]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Formatter.html#detail [value-classes]: {% link _overviews/core/value-classes.md %} -[sip-11]: {% link _sips/sips/string-interpolation.md %} +[sip-11]: {% link _sips/sips/011-string-interpolation.md %}