Re:Why Not Just Do Simple C++ RAII in C?
by actionfromafar on Thursday May 23, 2024 @05:13AM
(#40452381)
I can give an example on how to remove all undefined behaviour and preserve memory unsafety. First, we decide that all compilers compile to a fixed instruction set running on a CPU with a fixed memory model. Just pick one of the existing ones, like a 68000 or a 80486DX. Then, we decide that all unitialized memory is actually 0, always, from the operating system and the allocator. That should go pretty far or am I missing something?
[ Parent
| on HN ]
There are no comments on this comment yet.