Zig: Use The Heap to Know A Value's Address

from blog openmymind.net, | ↗ original
You'll often find yourself wanting to know the address of a newly created value which gets returned from a function. This can happen for a number of reasons, but the most common is creating bidirectional references. For example, if we create a pool of objects, we often want those objects to reference the pool. You might end up with something...