全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Defensive programming?

Definition 7.11 University Computer Science — Year 1 · 第 7 章 — Modular Programs, Makefiles and Tests

Defensive programming is writing each function so that it detects the situations it was not designed for, instead of computing garbage from them: it checks what it receives from outside the program and returns an error, and it asserts what its callers must guarantee.

在原文中阅读 →