Skip to content

Conversation

@3442853561
Copy link

整理Drop為一個文件

整理Drop
更新目錄
src/drop.md Outdated
by the Rust standard library, [`Drop`][drop]. The `Drop` trait provides a way
to run some code when a value goes out of scope. For example:
基於我們已經討論過特征了,現在讓我們一起來了解由Rust語言標準庫提供的特殊
的特征—— [`Drop`(丟棄)][drop]. 丟棄的特征是由一個值離開作用域時觸發的方
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

正體:特徵

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已訂正。

修整了若干錯別字和排版的問題
@3442853561
Copy link
Author

錯別字已訂正。

src/drop.md Outdated
to run some code when a value goes out of scope. For example:
基於我們已經討論過特徵了,現在讓我們一起來了解由Rust語言標準庫提供的特殊
的特徵—— [`Drop`(丟棄)][drop]. 丟棄的特徵是由一個值離開作用域時觸發的方
法,譬如說:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

對於 Drop 是否需要翻譯為中文,我覺得可能需要討論一下。
trait 因為是 Rust 的用法,目前保留原文似乎比較容易理解,上一章也是保留原文。
不知道您的看法是什麼?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這真是一個讓人頭疼的問題呢。譬如說C++中的class不也是譯成類了嗎?如果我們拒絕把trait 譯成特徵,把Drop 譯成丟棄。那麼還是沒有為不通英文的開發者提供方便呀。trait 直譯成特徵的確有點兒生硬,但是我覺得Drop 譯成丟棄這是合理的。因為它的確做的就是丟棄的操作。這裡咱們的確還需要進一步探討一下,暫時保留 丟棄(drop) , 特徵(trait) 這樣看起來是好的。

修正了若干問題

- 中文排版的問題
- 一些術語
- 還需要進一步確定的翻譯
16.9.1.12.43 master更新
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

Successfully merging this pull request may close these issues.

3 participants