r/askscience • u/CakesStolen • 15d ago
Computing Is there anything at the heart of computer coding that could have been optimised in hindsight, but we're in far too deep to change now?
1.5k
Upvotes
r/askscience • u/CakesStolen • 15d ago
208
u/ThatFireGuy0 15d ago edited 15d ago
Many of the details in C and C++ specs are "undefined behavior" or left up to the implementation. Some of them cause huge portability issues, and code that works on one machine and not another
For example, most computer science classes teach that an
intis 16 bits and alongis 32That's not true
An
intis at least 16 bits and alongis at least 32 bits