I'd like to poll your comments about Koka's static type level tracking of scopes:
<https://github.com/koka-lang/koka/blob/e2bfb9c170c73341c00a7acc99d14c0a69405dad/samples/handlers/named/heap.kk#L22-L24> <https://github.com/koka-lang/koka/blob/e2bfb9c170c73341c00a7acc99d14c0a69405dad/lib/std/core/types.kk#L380-L425> I'm coming to Nim in seeking a proper PL to implement relocatable memory blocks, i.e. with known data structures and local pointers in one such block, and the pointers are ideally to be "relative", that the value of pointer is offset from where it resides in the memory (i.e. its virtual address), so such a block file can be mmap'ed to another starting address, and everything just works without extra relocation, deref a pointer would need one addition op, store a pointer would be after a subtraction op. Koka only handles "heap"s at static type level, still using a single global heap at runtime, and due to it compiles to C and passes rvalues of ptrs around during code generation, I feel unhopeful to implement "relative pointers" atop it. And I see nlvm very promising to provide the base for a working "relative pointer" implementation, atop LLVM. Though it seems to stay at Nim v1 at the moment, I'd prefer to start trying based on Nim v2. My business scenario is to prepare data with the aid of physical RAM backed address space, then populate data file backed address space with typed data structures (graph) containing local pointers, then share the data file to many machines in clusters for readonly access via mmap, with zero-copy and zero relocation.