-
Notifications
You must be signed in to change notification settings - Fork 4
add TypeId.md #27
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
base: main
Are you sure you want to change the base?
add TypeId.md #27
Conversation
anyモジュールのフォルダーにTypeId.mdを追加
TypeId構造体のリファレンスを追加
|
レビューをもう少しお待ちください. |
hinshiba
left a comment
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.
貢献ありがとうございます.
Danger of Improper VarianceとExamplesについては確認お願いします.
他はこだわりがあるなら,そちらでもいいかなと考えています.
| ## 解説 | ||
|
|
||
| 型に対するグローバルに一意な識別子を提供する構造体。 | ||
| 不透明なオブジェクトであるため内部を直接見ることはできないが、cloneやdebugといった基本的な操作は可能である。 |
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.
不透明というのは日本語として不自然な気がします.
内部が隠蔽されているオブジェクト
とかがより実態に即していると思いますがどうでしょうか?
| ## 解説 | ||
|
|
||
| 型に対するグローバルに一意な識別子を提供する構造体。 | ||
| 不透明なオブジェクトであるため内部を直接見ることはできないが、cloneやdebugといった基本的な操作は可能である。 |
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.
debugといった...操作というのは不自然な気がします.Debug traitによる表示なのだから操作としては表示です.
トレイトにするならDebug...という基本的なトレイトを実装している.
操作にするなら表示...という基本的な操作は可能
がいいのではないでしょうか?
|
|
||
| 現在、`TypeId`は`'static`制約を満たすもののみ利用できるが、これは将来解除される可能性がある。 | ||
|
|
||
| また、`Hash`や`Ord`、`PartialOrd`を実装しているが、ハッシュ値や順序はRustのリリースごとに違うため、これらに依存した設計は避けるべきである。 |
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.
意図が入っていますが,こちらの方がいいと思われます.
| 現在、`TypeId`は`'static`制約を満たすもののみ利用できるが、これは将来解除される可能性がある。 | ||
|
|
||
| また、`Hash`や`Ord`、`PartialOrd`を実装しているが、ハッシュ値や順序はRustのリリースごとに違うため、これらに依存した設計は避けるべきである。 | ||
|
|
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.
Danger of Improper VarianceとExamplesが省略されています.
これは閲覧者が公式には追加の記述があることを一時的にでも書いておくことが親切かと思われます.
概要
anyモジュールのフォルダーにTypeId.mdを追加
変更内容
チェックリスト
mdbook buildを実行して確認した