4 ms·
Pointers are a core part of the CPU memory model on both ARM and x64, so they aren't going away anytime soon; there's no reason compilers, JITs or runtimes coul
by karatinversion 5y ago
Pointers are a core part of the CPU memory model on both ARM and x64, so they aren't going away anytime soon; there's no reason compilers, JITs or runtimes couldn't use pointer tagging, just the same as C programmers.
- pjmlp 5y agoTrue, but the way they are exposed to the programmers matter. Languages like Modula-2 or Ada, to use two C like languages, don't suffer from pointer abuse as much as C, because they provide better abstractions, thus raw pointer tricks aren't as dangerous to the whole system stability. While JIT and runtimes could make use of tagging as well, Lisp and Ada machines kind of proved the point that with memory safe runtimes, the CPU specialy extensions aren't as useful as general purpose CPUs hence why they moved away from such solutions. So there is a certain irony that we are now going back into C Machines as the ultimate mitigation.
- saagarjha 5y agoLisp and Ada machines happened to be very slow in practice. Turns out people prefer CPU extensions to make their C code fast rather than compiling it to a more exotic architecture.
- pjmlp 5y agoI missed the point, Lisp and Ada machines were never designed to run C code, other than a curiosity.
- saagarjha 5y agoWell, the two points I was making were 1. people want to run C code anyways, so that's not really an option for general-purpose use and 2. Lisp and Ada machines ended up being slow for Lisp and Ada, which makes them pretty unattractive.