Go supports this, I think. I am not quite sure what is meant by object relative layout.<p>In Go:<p>A struct is laid out as you declared it, with possible compiler added padding.
A struct value field (not a pointer) in another struct is laid out contiguously in memory as you declared it.
An array (or a slice) of values (no pointers) are laid out contiguously in memory.<p>You can happily take pointers into any of these larger structures. If you had a data structure where you really wanted to control the layout, you can create a slab allocator as a big array of values, and take pointers into that array to allocate pieces of your data structure. I did this exact thing to write a red-black tree in Go.<p>It is true that Go&#x27;s GC isn&#x27;t compacting. But it will be in the future (or it is planned to be).<p>But, if I hadn&#x27;t programmed in Go I would have agreed with your comment above.