Translate send-and-sync.md#51
Conversation
| captures this through the `Send` and `Sync` traits. | ||
| --> | ||
|
|
||
| すべてのものが継承可変性に従っているわけではありません。が、いくつかの型においては、 |
There was a problem hiding this comment.
ところが、すべてのものが継承可変性に従っているわけではありません。いくつかの・・・
"though" is a part of the first sentence.
There was a problem hiding this comment.
I think the translation is correct. The previous section doesn't refer to "inherited mutability" so "ところが" doesn't seem natural.
There was a problem hiding this comment.
The previous section doesn't refer to "inherited mutability" so "ところが" doesn't seem natural.
I agree on this.
My point is the first sentence and the second are not disjunctive.
"Some types allow you to ..." == "Some of the types that don't obey inherited mutability allow you to ..."
This seems ambiguity in the original text. How about ignoring "though" and drop "が、" ?
There was a problem hiding this comment.
Dropping "が、" may be the best, although I can't understand why this sentence is there...
| すべてのものが継承可変性に従っているわけではありません。が、いくつかの型においては、 | ||
| メモリ上の場所の値を変更している間に、複数のエイリアスを生成することが可能です。 | ||
| これらの型が、このアクセスを管理するために同期を行なわない限り、これらは絶対スレッドセーフでは | ||
| ありません。 Rust ではこれを、 `Send` トレイトと `Sync` トレイトでキャプチャしています。 |
There was a problem hiding this comment.
"capture -> キャプチャ" is in the translation table.
There was a problem hiding this comment.
My understanding is the translation table is for the programming terms whereas this "capture" is used in a non-programming context. I thought it would be less confusing if we did not use "キャプチャ".
I'm fine either way.
There was a problem hiding this comment.
On second thought, "Sync トレイトで表しています。" seems better. Actually this "capture" is not in a non-programming context.
(btw is there something which should be translated into "キャプチャ"? I can't think of any words. Rust doesn't have try-catch...)
There was a problem hiding this comment.
is there something which should be translated into "キャプチャ"? I can't think of any words. Rust doesn't have try-catch...
great question. I actually don't know. Maybe we can say "x captures y" in
let opt = Some(y);
match opt {
Some(x) => blah,
...
}
?
| これはつまり、これらを実装する事はアンセーフで、他のアンセーフなコードが、これらのトレイトが正しく | ||
| 実装されていると見なすことができます。これらのトレイトは*マーカートレイト* | ||
| (これらのトレイトは、メソッドなどの関連情報を備えていません) ですので、正しく実装することは、 | ||
| これらのトレイトが、型を実装するものが持っているべき intrinsic な特性を持っているということを |
|
|
||
| Send や Sync はまた、自動的に継承されるトレイトでもあります。これはつまり、他のすべてのトレイトとは | ||
| 違い、もしある型が Send や Sync を実装している型だけで構成されている場合、その型は Send や | ||
| Sync を実装しています。ほとんどすべてのプリミティブ型は Send や Sync を実装しています。 |
There was a problem hiding this comment.
Send や Sync になります。
or
Send や Sync を実装することになります。
imsut
left a comment
There was a problem hiding this comment.
sorry for pedantic, but I'd like to have just one more round on the very first two sentences. Whatever you choose, I'll merge.
Thanks as always!!
| captures this through the `Send` and `Sync` traits. | ||
| --> | ||
|
|
||
| すべてのものが継承可変性に従っているわけではありません。が、いくつかの型においては、 |
There was a problem hiding this comment.
The previous section doesn't refer to "inherited mutability" so "ところが" doesn't seem natural.
I agree on this.
My point is the first sentence and the second are not disjunctive.
"Some types allow you to ..." == "Some of the types that don't obey inherited mutability allow you to ..."
This seems ambiguity in the original text. How about ignoring "though" and drop "が、" ?
| すべてのものが継承可変性に従っているわけではありません。が、いくつかの型においては、 | ||
| メモリ上の場所の値を変更している間に、複数のエイリアスを生成することが可能です。 | ||
| これらの型が、このアクセスを管理するために同期を行なわない限り、これらは絶対スレッドセーフでは | ||
| ありません。 Rust ではこれを、 `Send` トレイトと `Sync` トレイトでキャプチャしています。 |
There was a problem hiding this comment.
My understanding is the translation table is for the programming terms whereas this "capture" is used in a non-programming context. I thought it would be less confusing if we did not use "キャプチャ".
I'm fine either way.
intrinsic is adj.
This "intrinsic" is not about the module of "intrinsic".
160cf7a to
ac60c15
Compare
| --> | ||
|
|
||
| * ある型を他のスレッドに安全に送信できる場合、その型は Send を実装します。 | ||
| * ある型をスレッド間で安全に共有できる場合、その型は Sync を実装します (`&T` は Send を実装します) 。 |
There was a problem hiding this comment.
Send と Sync について勉強中なのですが、The Book の記述と照らし合わせるに、ここの最後の部分は "if &T is Send" ということではないでしょうか?すなわち、
| * ある型をスレッド間で安全に共有できる場合、その型は Sync を実装します (`&T` は Send を実装します) 。 | |
| * ある型をスレッド間で安全に共有できる場合 (`&T` が Send を実装する場合) 、その型は Sync を実装します。 |
|
|
||
| `Rc` と `UnsafeCell` は本当に根本的にスレッドセーフではありません。すなわち、 | ||
| これらは、同期されていない共有可変状態を実現できてしまうからです。しかしながら、 | ||
| 生ポインタは、厳密に言えば、*リント*において、より一層スレッドアンセーフです。 |
There was a problem hiding this comment.
| 生ポインタは、厳密に言えば、*リント*において、より一層スレッドアンセーフです。 | |
| 生ポインタは、厳密に言えば、*リント*どころの騒ぎでなく、より一層スレッドアンセーフです。 |
| --> | ||
|
|
||
| しかしながら、これらの型を含んでいる型が、自動的にスレッドセーフとしてマークされないようにするために、 | ||
| これらがスレッドセーフではないということは重要です。これらの型は、些細ではない、そして追跡されない |
There was a problem hiding this comment.
[nits]
| これらがスレッドセーフではないということは重要です。これらの型は、些細ではない、そして追跡されない | |
| これらがスレッドセーフではないということは重要です。これらの型は、自明ではない、そして追跡されない |
| // I have some magic semantics for some synchronization primitive! | ||
| // プリミティブな型を同期する何か魔法のようなセマンティクスがある! |
There was a problem hiding this comment.
mdbook-transcheck で差分出そうな見た目をしています……
There was a problem hiding this comment.
rust-nomicon-jaは歴史的な理由で book-ja , rust-by-example-ja, edition-guide とは違う運用になっています。(たとえば、私は運用に関わってないです) そのため、現時点で mdbook-transcheck は使用していません。
将来は変わるかもしれませんが、いまは mdbook-transcheck のことは考えなくてよさそうに思います。
No description provided.