Are Non-Fixed Integer Sizes a Design Mistake?
A fairly common take is that C's platform-dependent integer types were a design mistake. An int is 16 bits on one machine and 32 on another; long is 64 bits on Linux but 32 on 64-bit Windows. But judging a 1970s design by 2020s conditions misses the point.
The World Before 8-bit Bytes Won
Machine word sizes in the 1960s–70s included PDP-8 (12-bit), PDP-7 (18-bit), PDP-11 (16-bit), PDP-10 (36-bit), CDC 6600 (60-bit), Cray-1 (64-bit), and many others. Characters weren't consistent either (6-bit, 7-bit ASCII, 9-bit bytes, EBCDIC).
Where C's Types Came From
BCPL and B were typeless — one machine word. The PDP-11 was byte-addressed; Dennis Ritchie describes how B's model fit poorly. C's char gave you the byte; int kept the spirit of BCPL's word — the natural integer of the machine. Even today, C11 §6.2.5 says a plain int has the natural size suggested by the architecture.
C Escapes the PDP-11
K&R (1978) already listed type sizes on DEC PDP-11, Honeywell 6000, IBM 370, and Interdata 8/32 — including 16-bit, 32-bit, and 36-bit ints, and 8-bit and 9-bit chars.
Why Flexible Sizes Were Useful
Fixed 32-bit int would have been costly on 16-bit machines (two instructions per op), wasteful on 36-bit machines, and painful on ones'-complement and word-addressed systems. ANSI C standardized minimum ranges, not exact sizes.
A Case Study in Portable C: Lua
Lua's “Clean C” approach asks the compiler what it has via <limits.h> and chooses types based on guaranteed ranges — e.g. LUAI_IS32INT, instruction types that are “at least 4 bytes,” and CHAR_BIT-aware packing in string.pack.
Being Fair: What Hurt
People assumed sizes; the LP64 vs LLP64 split hurt; <stdint.h> arrived late. Exact-width types remain optional when the machine lacks that width.
How Modern Languages Differ
Java, Rust, Zig, Go, and Swift pin down widths because the architecture wars were over — yet many still keep a natural/platform-sized integer (isize/usize, Go int, Swift Int).
Conclusion
Fixed integer sizes would have made C slow or impractical on many 1970s machines. Leaving sizes open, backed by guaranteed minimum ranges, made C run nearly everywhere. It wasn't a mistake. Portability was the whole point.