-
Notifications
You must be signed in to change notification settings - Fork 72
4.10 Mutability #83
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
4.10 Mutability #83
Conversation
@KeenS 確認の程、宜しくお願いします。 |
<!-- bind `y` to something else (`y = &mut z`), but you can mutate the thing that’s --> | ||
<!-- bound to `y` (`*y = 5`). A subtle distinction. --> | ||
`y` はミュータブル参照へのイミュータブルな束縛であり、 `y` を他の束縛に変える(`y = &mut z`)ことはできません。 | ||
しかし、`y` に束縛されているものを変化させること(`*y = 5`)は可能です。 |
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.
"A subtle distinction." の訳もお願いします。
レビュー終わりました。1点だけコメントしましたので、ご対応をお願いします。 |
<!-- the structure itself. It’s not user facing. For this reason, it hands out `&T` --> | ||
<!-- with `clone()`. If it handed out `&mut T`s, though, that would be a problem. --> | ||
つまり、「イミュータビリティ」の真の定義はこうです: これは2箇所から指されても安全ですか? | ||
`Arc<T>` の例では、イエス: 変更は完全にそれ自身の構造の内側で行われます。ユーザ向いではありません。 |
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.
「ユーザ向いではありません」ではちょっと分かり難いと思います。
変更が内側で行われるので、「ユーザからは見えません」くらいでしょうか
@tatsuya6502 レビューありがとうございます。コメント反映しました。(cc: @ykomatsu ) |
マージします。おつかれさまでした! |
4.10 Mutability に着手。