知识卡片

普通读书笔记卡 · 6075

指南要连同理由使用

理解等级:中级

编程指南应同时说明建议、理由和前提,读者才能判断某个例外是否成立。学习Rust时,要理解类型、借用和资源边界为何这样安排,而非把另一种语言的结构逐句翻译。承认例外不等于任意违反契约;偏离建议时仍应给出具体依据。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Preface Who This Book Is For · 查看原书依据

      guidelines have exceptions—providing the detailed rationale for a guideline allows readers to decide for themselves whether their particular scenario warranted breaking the rule. The general style of giving advice together with the reasons for that advice is preserved here. However, since Rust is remarkably free of footguns, the Items here concentrate more o

    参考来源

    - 位置:《Effective Rust 35 Specific Ways to Improve Your Rust Code (David Drysdale)》第0章《Who This Book Is For》(spine4;extracted/Effective Rust 35 Specific Ways to Improve Your Rust Code (David Drysdale)/_epub-src/OEBPS/preface01.html;u002-ch00-002)。 - 结论依据:原文在“guidelines have exceptions”附近的定义、例子或代码支撑本卡核心说明:编程指南应同时说明建议、理由和前提,读者才能判断某个例外是否成立。边界按已读前提解释;示例未执行。 - 原始内容:guidelines have exceptions—providing the detailed rationale for a guideline allows readers to decide for themselves whether their particular scenario warranted breaking the rule. The general style of giving advice together with the reasons for that advice is preserved here. However, since Rust is remarkably free of footguns, the Items here concentrate more o