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

ch17-02:「実行時」にコンパイラはどのメソッドを呼ぶか知る? #121

Open
scivola opened this issue Oct 31, 2020 · 1 comment

Comments

@scivola
Copy link

scivola commented Oct 31, 2020

ch17-02
https://doc.rust-jp.rs/book-ja/ch17-02-trait-objects.html

代わりに実行時に、トレイトオブジェクト内でポインタを使用して、 コンパイラは、どのメソッドを呼ぶか知ります。

とあります。原文は

Instead, at runtime, Rust uses the pointers inside the trait object to know which method to call.

です。
原文のほうも「一体その Rust って誰だよ?」という疑問が涌いてきますが,少なくともコンパイラーが実行時に何かを知る,ということはあり得ないことだと思います。

@taiki-e
Copy link

taiki-e commented Nov 22, 2020

「コンパイルされたプログラムは」あたりが適訳でしょうか。ここでのコンパイラの役割は動的ディスパッチを行うコードを生成することなので。

@tatsuya6502 tatsuya6502 changed the title ch17-02 ch17-02:実行時にコンパイラはどのメソッドを呼ぶか知ru Apr 4, 2021
@tatsuya6502 tatsuya6502 changed the title ch17-02:実行時にコンパイラはどのメソッドを呼ぶか知ru ch17-02:「実行時」にコンパイラはどのメソッドを呼ぶか知る? Apr 4, 2021
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

No branches or pull requests

2 participants