11 ms·
You cast integers to pointers and play with fire, of course!
by apgwoz 2y ago
You cast integers to pointers and play with fire, of course!
- fc417fc802 2y agoVoid*? Int. Char**? Also an Int. I take it back. This is true systems programming - the same type safety that raw assembly is known for.
- pjmlp 2y agoIronically Assembly is safer than C and languages that descend from it, because although CPUs might have undefined behaviour when given undocumented opcodes, or operation modes, the CPU doesn't rewrite your code without telling you about it.
- AnimalMuppet 2y agoThat's "safer" only against a very specific and limited set of dangers. But it opens the door to other dangers.
- fithisux 2y agoYes it is. Great comment.