Skip to content
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

Optionalの説明改善 #461

Merged
merged 58 commits into from
Oct 6, 2023

Conversation

KaitoMuraoka
Copy link
Contributor

@KaitoMuraoka KaitoMuraoka commented Sep 1, 2023

Closes #433

タイトルとIssueの通りです。
参考元のPRは日本時間8月31日にマージされました。

参考:apple/swift-book#143

Copy link
Contributor Author

@KaitoMuraoka KaitoMuraoka left a comment

Choose a reason for hiding this comment

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

セルフレビュー

language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
@KaitoMuraoka KaitoMuraoka marked this pull request as ready for review September 1, 2023 09:33
@github-actions github-actions bot requested a review from stzn September 1, 2023 09:33
@stzn
Copy link
Owner

stzn commented Sep 1, 2023

ありがとうございます!
すいません、ちょっと今週末は見る時間がないと思いますので少々お待ちくださいmm

@KaitoMuraoka
Copy link
Contributor Author

いつでも大丈夫です!
事情は重々承知しております。
自分もiOSDC参加組なので
変な気を使わせてしまい申し訳ありません 🙇

Copy link
Owner

@stzn stzn left a comment

Choose a reason for hiding this comment

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

ありがとうございます。ほとんどLGTMです。
一部細かいコメントをしています。主に既存の記載でも表記ゆれの問題があり、それに関する修正です。(「オプショナル」「オプショナルの値」を「オプショナル値」に統一など)
ここら辺の表現方法は悩んでいるところもあるので、もしご意見あればいただけると嬉しいですmm

Style.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
KaitoMuraoka and others added 6 commits September 9, 2023 17:07
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
@KaitoMuraoka
Copy link
Contributor Author

「オプショナルの値」を「オプショナル値」にしようかなと思いましたがどうでしょうか?

問題ないと思います!

しかし、「オプショナルの値」と表記されている箇所が何点か見受けられます。
これは後に変更が加えられたら修正するという方針でしょうか?
それとも、新しくIssueを立てて、編集する感じですか?

参考

`topItem` プロパティは、`Element` 型のオプショナルの値を返します。スタックが空の場合、`topItem``nil` を返します。スタックが空でない場合、`topItem``items` 配列の最後のアイテムを返します。

次は、`findIndex(of:in:)` と呼ばれる、`findIndex(ofString:in:)` のジェネリックバージョンを示しています。この関数は配列のオプショナルの値ではなく、オプショナルのインデックスの番号を返すため、この関数の戻り値の型は引き続き `Int?` であることに注目してください。ただし、次の例の後に説明する理由により、この関数はコンパイルできないことに注意してください:

他のオプショナルの値と同様に、弱参照内の値の存在を確認できます。存在しない無効なインスタンスへの参照で終わることはありません。

こうすることで、強循環参照を作成せずに単一の文で `Country``City` のインスタンスを作成できることを意味します。また、オプショナルの値をアンラップするために感嘆符を使用する必要もなく、`capitalCity` プロパティに直接アクセスできます:

また、「オプショナル値」となっている箇所もあります。

> オプショナル値の基になる型は `Optional` です。これは、Swift 標準ライブラリの列挙型です。`Optional` は、値型を `unowned` でマークできないという規則の例外です。

Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
@KaitoMuraoka
Copy link
Contributor Author

@stzn
遅くなりました💦
修正したので確認お願いします!

変更内容

  1. ”optional value” を全て「オプショナル値」に編集しました。
  2. 一部、"non-optional value" は「非オプショナル値」に修正しました。
  3. "optional value" が原本にはあるのに記載がない箇所は、文全体を修正しました:3c950db, cc06e33

Copy link
Owner

@stzn stzn left a comment

Choose a reason for hiding this comment

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

ありがとうございます!
いくつか追加したいところがあったのでコメントしています。お時間のある時にご確認ください🙇🏻‍♂️(全然急がなくて大丈夫です!)

language-guide/optional-chaining.md Outdated Show resolved Hide resolved
language-guide/optional-chaining.md Outdated Show resolved Hide resolved
language-guide/optional-chaining.md Outdated Show resolved Hide resolved
language-guide/type-casting.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
KaitoMuraoka and others added 11 commits September 26, 2023 15:36
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
@KaitoMuraoka
Copy link
Contributor Author

@stzn
ありがとうございます。
編集したので、確認お願いします 🙇

stzn
stzn previously approved these changes Sep 26, 2023
Copy link
Owner

@stzn stzn left a comment

Choose a reason for hiding this comment

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

色々とご対応ありがとうございます!

最後に既存のコードでいくつか修正したいところがあったので提案をしています🙇🏻‍♂️
そこに問題なければ取り込んでください。その後マージします。

language-guide/generics.md Outdated Show resolved Hide resolved
language-guide/optional-chaining.md Outdated Show resolved Hide resolved
language-guide/protocols.md Outdated Show resolved Hide resolved
language-guide/type-casting.md Outdated Show resolved Hide resolved
welcome-to-swift/a-swift-tour.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
language-guide/the-basics.md Outdated Show resolved Hide resolved
KaitoMuraoka and others added 10 commits October 6, 2023 15:09
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
Co-authored-by: shiz <35151927+stzn@users.noreply.github.com>
@KaitoMuraoka
Copy link
Contributor Author

@stzn
すみません。確認お願いします 🙇

9331a3fは取り入れようとしたら間違ったボタン(Add Suggetion batch)を押してしまいました💦

Copy link
Owner

@stzn stzn left a comment

Choose a reason for hiding this comment

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

ありがとうございます!大丈夫だと思うのでマージしますね!

@stzn stzn merged commit 7500681 into stzn:master Oct 6, 2023
@KaitoMuraoka KaitoMuraoka deleted the improement-Optional-description branch October 7, 2023 04:20
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.

Optionalの説明の改善
2 participants