How to get address of object
If your object is really a "ref object" then this does it: cast[ByteAddress](this)
How to get address of object
I came across an interesting problem in Nim: how to get the address of an object, defined as the memory location of the first byte of the object, in a printable form (uint/string), such that it can be included in a $ operator. I tried cast[ByteAddress](this.unsafeAddr)