-
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については確認お願いします.
他はこだわりがあるなら,そちらでもいいかなと考えています.
src/any/TypeId.md
Outdated
| ## 解説 | ||
|
|
||
| 型に対するグローバルに一意な識別子を提供する構造体。 | ||
| 不透明なオブジェクトであるため内部を直接見ることはできないが、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.
不透明というのは日本語として不自然な気がします.
内部が隠蔽されているオブジェクト
とかがより実態に即していると思いますがどうでしょうか?
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.
不透明型というプログラミング用語があるくらいなので大丈夫だと思います。
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.
そうなんですか?
ちょっと調べた限りでは見当たらなかったので,例を示していただけると助かります.
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.
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.
それはIBMのinfomix-serversの英語版の翻訳で使われているだけだと思うのですが......
不透明 (OPAQUE) 型の内部構造はデータベース サーバに通知されません
他にヒットするものもyahoo知恵袋,qiita, zennが1つずつしかなく,それもpublicなのかprivateなのかという話だと思っています.不透明な型という表現も散見されますが,隠蔽が定着しているので別に新しい表現でなくてもいいような気もしています.
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.
意図が入っていますが,こちらの方がいいと思われます.
| 現在、`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が省略されています.
これは閲覧者が公式には追加の記述があることを一時的にでも書いておくことが親切かと思われます.
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.
見逃していました。追加します
概要
anyモジュールのフォルダーにTypeId.mdを追加
変更内容
チェックリスト
mdbook buildを実行して確認した