4 ms·
> Personally, I love arbitrary memory access. C++ does not really permit this. It is incredibly hard to do type punning from void* without hitting UB. You real
by UncleMeat 4y ago
> Personally, I love arbitrary memory access.
C++ does not really permit this. It is incredibly hard to do type punning from void* without hitting UB. You really are only allowed to access objects through their names according to their lifetimes.
Here (https://www.youtube.com/watch?v=IAdLwUXRUvg https://www.youtube.com/watch?v=IAdLwUXRUvg) is a fun talk that involves trying to do a pretty basic kind of arbitrary memory access and concluding that it is simply not possible in C++.
- mxkopy 4y agoFrom my understanding C is really nonchalant about this. The resistance is mostly from the OS side. I'm sure with C++ it's more complicated, but not impossible. With Rust it gets really funny. You have to subscribe to a completely unrelated mental model to read some numbers from a tape.