-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update structs.md #2
Conversation
@Zabalkanskiy спасибо за перевод! Пожалуйста, добавьте |
@@ -0,0 +1,103 @@ | |||
title: Структуры |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Необходимо добавить ---
первой строчкой.
structs.md
Outdated
|
||
## Определение структур | ||
|
||
Для определения структуры используется `defstruct` конструкция: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше поменять местами на "конструкцияdefstruct
"
structs.md
Outdated
|
||
Для определения структуры используется `defstruct` конструкция: | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше добавить название языка в блоках кода здесь и в остальных местах.
"```elixir"
structs.md
Outdated
Структуры берут имя модуля, в котором они определены. В приведенном выше примере мы определили структуру с именем `User`. | ||
|
||
Теперь мы можем создавать `User` структуры, используя синтаксис, аналогичный тому, который используется для создания `map`: | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
structs.md
Outdated
...> end | ||
``` | ||
|
||
Список ключевых слов, используемый при определении defstruct , определяет, какие поля будет иметь структура вместе со значениями по умолчанию. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Убрать пробел перед запятой.
structs.md
Outdated
|
||
Для определения структуры используется `defstruct` конструкция: | ||
Для определения структуры в `elixir` используется `defstruct` конструкция: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zabalkanskiy может быть я не совсем понятно выразился, но это не те правки, которые нужно было сделать.
- Подзаголовок "Определение структур" нужно оставить как есть, это же прямой перевод.
- Поменять местами слова "defstruct" и "конструкция" нужно в этом предложении, чтобы получилось
"Для определения структуры используется конструкцияdefstruct
:". - Слово "elixir" нужно добавить в блоках кода, чтобы компилятор понимал, какую подсветку синтаксиса использовать. Если вы хотите добавить блок кода на языке Эликсир, нужно после трёх косых обратных апострофов поставить название языка "elixir", чтобы получилось "```elixir".
Спасибо!
No description provided.