Skip to content

Ni mark scala 3 only in ru #2879

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 3 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _ru/scala3/book/types-dependent-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ language: ru
num: 57
previous-page: types-structural
next-page: types-others
versionSpecific: true
---

_Зависимый тип функции_ (_dependent function type_) описывает типы функций,
Expand Down
6 changes: 5 additions & 1 deletion _ru/scala3/book/types-opaque-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ language: ru
num: 55
previous-page: types-variance
next-page: types-structural
versionSpecific: true
---

В Scala 3 _непрозрачные псевдонимы типов_ (_opaque type aliases_) обеспечивают абстракции типов без каких-либо **накладных расходов**.
_Непрозрачные псевдонимы типов_ (_opaque type aliases_) обеспечивают абстракцию типов без каких-либо **накладных расходов**.

В Scala 2 аналогичный результат можно получить с помощью [классов значений][value-classes].

## Накладные расходы на абстракцию

Expand Down Expand Up @@ -172,3 +175,4 @@ val d: Double = log2 // ERROR: Found Logarithm required Double
Как показано выше, непрозрачные типы удобны в использовании и очень хорошо интегрируются с [функцией методов расширения][extension].

[extension]: {% link _overviews/scala3-book/ca-extension-methods.md %}
[value-classes]: {% link _overviews/core/value-classes.md %}
3 changes: 2 additions & 1 deletion _ru/scala3/book/types-others.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ language: ru
num: 58
previous-page: types-dependent-function
next-page: ca-contextual-abstractions-intro
versionSpecific: true
---

В Scala есть несколько других расширенных типов, которые не показаны в этой книге, в том числе:
Expand All @@ -22,6 +23,6 @@ next-page: ca-contextual-abstractions-intro
- Типы уточнения
- Вид полиморфизма

Дополнительные сведения об этих типах см. в [Справочной документации][reference].
Дополнительные сведения об этих типах см. в [Справочной документации Scala 3][reference].

[reference]: {{ site.scala3ref }}/overview.html
6 changes: 6 additions & 0 deletions _ru/scala3/book/types-structural.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ language: ru
num: 56
previous-page: types-opaque-types
next-page: types-dependent-function
versionSpecific: true
---

_Scala 2 содержит более слабую форму структурных типов, основанную на Java reflection,
достигаемую с помощью `import scala.language.reflectiveCalls`_.

## Введение

Некоторые варианты использования, такие как моделирование доступа к базе данных,
более удобны в динамически типизированных языках, чем в статически типизированных языках.
С динамически типизированными языками естественно моделировать строку как запись или объект
Expand Down