Skip to content

Commit 1c4086a

Browse files
authored
Merge branch 'scala:main' into zh-cn/overviews/scala3-book/scala-tools
2 parents 1f99707 + 2c56642 commit 1c4086a

File tree

14 files changed

+810
-18
lines changed

14 files changed

+810
-18
lines changed

_includes/sidebar-toc-multipage-overview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% assign pagetype = page.type %}
22
<div class="content-nav">
3-
<div class="inner-box sidebar-toc-wrapper {% if pagetype %}book{% endif %}" style="">
3+
<div class="inner-box sidebar-toc-wrapper" style="">
44
<h5 class="contents">Contents</h5>
55
{% if pagetype %}
66
<div class="inner-toc book" id="sidebar-toc">

_overviews/FAQ/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,22 @@ be written using the `_` syntax.
196196

197197
See also [SLS 6.23.2](https://scala-lang.org/files/archive/spec/2.13/06-expressions.html#placeholder-syntax-for-anonymous-functions).
198198

199+
### Why couldn't Scala infer the correct type in my code?
200+
201+
It is difficult to generalize about type inference, because various features of the language
202+
affect how your code is construed. There may be several ways to rewrite your code to make
203+
the types fall out naturally.
204+
205+
The most straightforward workaround is to supply explicit types in your code.
206+
207+
That may involve specifying an explicit type to a definition, or a type argument to a method.
208+
209+
Type inference is greatly improved in Scala 3. If Scala 2 doesn't compile your code, it's worth trying with Scala 3.
210+
211+
Sometimes, using multiple parameter lists helps inference, as explained in [this section of the language tour](https://docs.scala-lang.org/tour/multiple-parameter-lists.html#drive-type-inference).
212+
213+
For common questions about type inference involving `toSet`, see the discussions on [this ticket](https://github.com/scala/bug/issues/7743) and a related [Q&A](https://stackoverflow.com/questions/5544536/in-scala-2-type-inference-fails-on-set-made-with-toset).
214+
199215
### Can I chain or nest implicit conversions?
200216

201217
Not really, but you can [make it work](https://stackoverflow.com/a/5332804).

_overviews/jdk-compatibility/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Minimum Scala versions:
1414

1515
| JDK | 3 | 2.13 | 2.12 | 2.11 |
1616
|:-----------:|:--------:|:---------:|:---------:|:----------:|
17-
| 22 (ea) | 3.3.2* | 2.13.12* | 2.12.19* | |
17+
| 22 (ea) | 3.3.2* | 2.13.12 | 2.12.19* | |
1818
| 21 (LTS) | 3.3.1 | 2.13.11 | 2.12.18 | |
1919
| 20 | 3.3.0 | 2.13.11 | 2.12.18 | |
2020
| 17 (LTS) | 3.0.0 | 2.13.6 | 2.12.15 | |
@@ -115,11 +115,11 @@ For possible Scala issues, see the [jdk11](https://github.com/scala/bug/labels/j
115115

116116
Early access builds of JDK 22 are available. JDK 22 will be non-LTS.
117117

118-
We are working on adding JDK 22 support to the 2.12.x, 2.13.x, and
119-
3.3.x release series.
118+
Initial support for JDK 22 has been merged and is now available in
119+
Scala 2.13.12.
120120

121-
<!-- Initial support for JDK 22 has been merged and is now available in
122-
Scala 3.3.2, 2.13.12, and 2.12.19. -->
121+
We are working on adding JDK 22 support to the 2.12.x and 3.3.x
122+
release series. (Support may be available in nightly builds.)
123123

124124
## GraalVM Native Image compatibility notes
125125

_overviews/scala3-book/tools-sbt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Building and Testing Scala Projects with sbt
33
type: section
44
description: This section looks at a commonly-used build tool, sbt, and a testing library, ScalaTest.
5-
languages: [zh-cn]
5+
languages: [ru, zh-cn]
66
num: 70
77
previous-page: scala-tools
88
next-page: tools-worksheets

_overviews/scala3-book/tools-worksheets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Worksheets
33
type: section
44
description: This section looks at worksheets, an alternative to Scala projects.
5-
languages: [zh-cn]
5+
languages: [ru, zh-cn]
66
num: 71
77
previous-page: tools-sbt
88
next-page: interacting-with-java

_ru/learn.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Online ресурсы
3+
layout: singlepage-overview
4+
language: ru
5+
---
6+
7+
## Попробуй Scala в своем браузере!
8+
9+
Существует несколько веб-сайтов, на которых вы можете интерактивно запускать код Scala в своем браузере!
10+
Взгляните на [Scastie](https://scastie.scala-lang.org/).
11+
12+
## Онлайн-курсы от Scala Center
13+
14+
[Scala Center](https://scala.epfl.ch) стремится создавать высококачественные и бесплатные онлайн-курсы
15+
для изучения Scala и функционального программирования.
16+
Уровни курса варьируются от начального до продвинутого.
17+
Более подробная информация доступна [на следующей странице]({% link online-courses.md %}).
18+
19+
## Упражнения на языке Scala
20+
21+
[Scala Exercises](https://www.scala-exercises.org/) — это серия уроков и упражнений, созданных [47 Degrees](https://www.47deg.com/).
22+
Это отличный способ получить краткое представление о Scala и одновременно проверить свои знания.
23+
24+
[Tour of Scala](https://tourofscala.com) шаг за шагом знакомит вас со Scala, от новичка до эксперта.
25+
26+
## Лекции доктора Mark C Lewis из Trinity University
27+
28+
[Dr. Mark C Lewis](https://www.cs.trinity.edu/~mlewis/) из Университета Тринити, Сан-Антонио, Техас,
29+
преподает курсы программирования с использованием языка Scala.
30+
Видеокурсы доступны на YouTube бесплатно. Некоторые курсы ниже.
31+
32+
- [Introduction to Programming and Problem Solving Using Scala](https://www.youtube.com/playlist?list=PLLMXbkbDbVt9MIJ9DV4ps-_trOzWtphYO)
33+
- [Object-Orientation, Abstraction, and Data Structures Using Scala](https://www.youtube.com/playlist?list=PLLMXbkbDbVt8JLumqKj-3BlHmEXPIfR42)
34+
35+
Вы можете посетить его [YouTube канал](https://www.youtube.com/user/DrMarkCLewis/featured),
36+
чтобы найти больше видео.
37+
38+
## Сообщество обучения Scala
39+
40+
[Сообщество по изучению Scala в Discord](http://sca.la/learning-community) — растущее онлайн-сообщество,
41+
объединяющее учащихся с онлайн-ресурсами для совместного изучения Scala.
42+
43+
## allaboutscala
44+
45+
[allaboutscala](https://allaboutscala.com/) предоставляет подробные руководства для начинающих.
46+
47+
## DevInsideYou
48+
49+
[DevInsideYou](https://youtube.com/devinsideyou) — это YouTube канал с сотнями часов бесплатного контента Scala.
50+
51+
## Rock the JVM
52+
53+
[Rock the JVM](https://rockthejvm.com) — это учебная платформа с бесплатными и платными курсами
54+
по языку Scala, Akka, Cats Effect, ZIO, Apache Spark и другим инструментам экосистемы Scala.
55+
Он также содержит сотни [бесплатных видеоуроков](https://youtube.com/rockthejvm)
56+
и [статей](https://blog.rockthejvm.com) по различным темам, связанным со Scala.
57+
58+
## Visual Scala Reference
59+
60+
[Visual Scala Reference](https://superruzafa.github.io/visual-scala-reference/) — руководство по визуальному изучению концепций и функций Scala.

0 commit comments

Comments
 (0)