TLDR Dev · MISCELLANEOUS

LINUS TORVALDS VS. AMBIGUOUS ABSTRACTIONS

read.thecoder.cafe7 min read

Summary from the TLDR Dev newsletter

Linus Torvalds has criticized the helper function, `make_u32_from_two_u16()`, arguing that the issue wasn't abstraction itself but the function's ambiguity. Torvalds found the helper unclear because it didn't explicitly state the word order, increasing cognitive load for the user. This post proposes a clearer alternative, `make_u32_from_msw_lsw()`, that encodes the word order in the name.