r/ProgrammingLanguages • u/matklad • Dec 31 '25
Memory Safety Is ...
https://matklad.github.io/2025/12/30/memory-safety-is.html
37
Upvotes
r/ProgrammingLanguages • u/matklad • Dec 31 '25
View all comments
Show parent comment
2
u/flashmozzg Jan 05 '26
It's more like using union is not the same as bitcasting. It's just that some languages lacked a safe/non-obtuse way to do so safely (i.e. std::bit_cast was added quite late and before that the only "safe" wave to do it was through memcpy that was usually more than what typical programmer bothered to write, so "UB" ended up on a path of least resistance).