2 ms·
> More generally, C’s notion of memory, arranged in an address space, allows code to address (point to) and access (read, write, call) objects inhabiting that s
by jancsika 9y ago
> More generally, C’s notion of memory, arranged in an address space, allows code to address (point to) and access (read, write, call) objects inhabiting that space. Unlike most other languages, those objects need not have been defined within our program. In fact they even need not behave in the same way as such objects. Despite this, in all cases we access them in the same, uniform way.
But can't a systems language like Rust do this, too?
- kibwen 9y agoYes, it can and does. A common usecase for Rust is to write libraries that are then linked in to higher-level language VMs and interpreters, as a way of extending those languages, a process which inevitably involves accessing memory that wasn't allocated by Rust and that behaves according to whatever invariants the higher-level language imposes.