跳到主要内容

不能望文生义

· 阅读需 2 分钟

There are only two hard things in Computer Science: cache invalidation and naming things.

— Phil Karlton

Linux​

install 的功能不是用来安装软件。

less 的功能比 more 要强大得多。

time 不能用来修改时间,date 才可以。

cat 不是猫,man 不是人,whoami 更是回避哲学问题。

fsck 不是一个拼写错误。

C++​

std::move(x) 函数不会移动 x。

std::remove(...) 函数不会删除任何元素。

std::qsort() 不一定是快速排序算法。(这个算 C 语言的锅)

static 绝大多数用法与「静态」完全无关。

noexcept 不是在保证不会出错。

Python​

list 不是链表。

namespace 不是命名空间,而是一种容器。

isinstance(float('NaN'), numbers.Number) == True, 可是 NaN 的意思明明就是 Not a Number。

range(1, 5) 里面有 1 却没有 5。(数学家表示最好写成 range[1, 5))

import this 并不会载入 this 指针。

English​

driveway 是用来停车的,但 parkway 上车速飞快。

valuable == invaluable; invalidated != unvalidated; He ain't lying == He ain't no lying.

bad, badder, baddest 不能被 bad, worse, worst 代替——坏坏男孩 baddest boi 女孩爱,但没人会爱 worst boi。

the sh*t 意思是「太棒了!」